The size of raw pixels
An image on screen is a grid of pixels, and each pixel holds a number of bits that describe its color. Multiply the two and you have the amount of memory the picture needs before any compression. That figure matters for sizing video buffers, frame grabbers, scientific cameras and the memory of an embedded display. It also shows what compression is saving you. This page calculates the raw size from width, height and bits per pixel, optionally for many frames. File formats such as PNG and JPEG store the same picture in far fewer bytes, but the uncompressed size is the starting point for comparing them. The size also sets a floor for the bandwidth of an uncompressed video link or the memory of a frame buffer.
Raw bytes for a 1,920 by 1,080 frame
Bytes = ceil(width × height × bits per pixel / 8) × frames, and megabytes = bytes / 1,000,000. The defaults give a 1,920 × 1,080 image at 24 bits per pixel and one frame. That is 2,073,600 pixels, 49,766,400 bits, and 6,220,800 bytes, or 6.2208 MB. A 24-bit pixel has three channels, red, green and blue, with 8 bits each, so each pixel takes 3 bytes. Doubling either the width or the height doubles the size, and doubling both quadruples it. The rounding up applies to each frame, so a frame whose bit count is not a multiple of 8 is padded to the next whole byte.
Ultra HD and still photographs
A 3,840 × 2,160 frame (UHD) at 24 bits per pixel contains 8,294,400 pixels and takes 24,883,200 bytes, or 24.8832 MB, exactly four times the Full HD figure, because the pixel count is four times higher. A 12-megapixel photo of 4,000 × 3,000 pixels stored at 48 bits per pixel, which is 16 bits per color channel as in some raw and professional formats, takes 72,000,000 bytes, which is 72 MB. A 1,024 × 768 grayscale image at 8 bits per pixel takes 786,432 bytes, about 0.786 MB. Scientific cameras often record 12 or 16 bits per pixel, and the same frame at 16 bits would take 1,572,864 bytes.
Video as a sequence of frames
The frame input turns the calculation into video. One second of Full HD video at 30 frames per second and 24 bits per pixel is 6,220,800 × 30 = 186,624,000 bytes, or 186.624 MB. That is about 1,493 Mbit/s, which explains why raw video is rarely stored or transmitted without compression. A one-hour recording at that rate would fill over 670 GB. Video codecs reduce the data by a factor of tens to hundreds by exploiting similarity between frames, which is the reason a file of the same video can be small. Streaming services typically deliver video at a few Mbit/s, a small fraction of the raw rate. Image sensors also record more bits than a display shows, so a camera that captures 14 bits per color channel produces raw files larger than the 8-bit pictures they are later converted into, and the frame count lets you size a burst of continuous shots in the same way.
Bits per pixel and what they mean
Common values include 1 bit for black and white, 8 bits for grayscale or an indexed palette, 24 bits for RGB with 8 bits per channel and 32 bits for RGB plus an alpha channel for transparency. A 24-bit image can show 16,777,216 colors. Some video formats use chroma subsampling, which stores color at lower resolution than brightness. In the common 4:2:0 scheme, the average is 12 bits per pixel. At that depth, a Full HD frame takes 1,920 × 1,080 × 12 / 8 = 3,110,400 bytes, half of the RGB figure. Camera sensors and many broadcast formats use this layout, which is one reason raw video figures from different sources can disagree.
Why rounding up to a byte matters
Most depths are multiples of 8 and give whole bytes. A 1-bit image is different. A tiny 100 × 75 image at 1 bit per pixel has 7,500 bits, which is 937.5 bytes, and the page rounds up to 938 bytes. Real storage of such images usually pads each row to a whole byte, which can make the real figure larger. The calculator takes the entire frame as one tightly packed bitstream, which is the minimum, and it may undercount formats that pad rows. The default sizes, such as 1,920 pixels at 24 bits, are already whole bytes per row, so padding matters mainly for odd widths at low bit depths.
Headers, row padding and containers
Real files add to the pixel data. A BMP file has a header, and its rows are padded to a multiple of 4 bytes, so the file is slightly bigger than the pixels alone. Formats such as TIFF add tags, and video containers add timing and index data. These costs are small compared with the pixels of a large image, but for tiny images they can dominate. The page leaves them out on purpose, so the result is the pure pixel payload, and you add format overhead separately if you need to know the file size. A rough way to estimate it is to add the header length stated in the format specification.
Compressed formats and comparison
Compare the raw size with the size of a real file to see the compression ratio. Suppose, as an illustration, that the 6.2208 MB frame is saved as a 1.2 MB PNG. The ratio is then about 5.2 to 1. Lossless methods such as PNG exploit patterns and do better on graphics than on photographs. Lossy methods such as JPEG discard detail the eye is less likely to notice, and may reduce a photo by a factor of ten or more at moderate quality. The ratio depends on the picture, so there is no fixed conversion from raw size to file size. A photograph with fine texture compresses less than a screenshot with flat colors.
Why real image files differ from raw size
The page models a tightly packed whole-frame bitstream. It excludes headers, row padding, compression and codec or container overhead, and it assumes every frame has the same dimensions and depth. It cannot estimate the size of a compressed file. Units are decimal, where 1 MB is 1,000,000 bytes, following the SI prefix definitions in NIST SP 811. Operating systems that report binary units will show smaller numbers for the same bytes.