How to use the calculator
Use this page when you know a raster image’s pixel width, pixel height, and the number of bits stored for each pixel. It calculates the minimum whole-byte payload for those pixels. It does not read, resize, convert, or compress an image.
- Enter the width and height as whole pixel counts. Use the actual raster dimensions, not print inches or PPI.
- Enter total bits per pixel. Common examples are 8 bpp grayscale or indexed data, 24 bpp RGB, and 32 bpp RGBA.
- Select Calculate. The result shows pixels, exact bits, whole bytes, decimal MB/GB, and binary MiB/GiB.
- If the bit count does not end on a byte boundary, the final byte is rounded up and the padding-bit count is shown.
- Changing any input immediately removes the confirmed answer and disables Copy result until you calculate again.
Formula and byte rounding
Pixel count = width × height. Total bits = pixel count × bits per pixel. Stored whole bytes = ceiling(total bits ÷ 8). The ceiling matters for 1-, 2-, or 4-bit data: a fraction of a byte cannot be the final storage unit, so only the final byte is completed with unused bits.
This assigned formula rounds the complete pixel payload to the final byte once. It deliberately does not round every scanline. Some real formats align each row to a byte or larger word boundary and can therefore use more bytes.
- Width and height are whole numbers from 1 to 1,000,000.
- Bits per pixel is a whole number from 1 to 1,024.
- All multiplication uses exact integers before the final unit conversions.
- Displayed decimal values use at most two fractional digits; the stored byte result remains exact.
Worked examples
Full HD RGB image
1,920 × 1,080 pixels contains 2,073,600 pixels. At 24 bits per pixel, that is 49,766,400 bits or 6,220,800 bytes: 6.22 MB or about 5.93 MiB before any header or compression.
Small 1-bit bitmap
13 × 7 pixels at 1 bit per pixel contains 91 bits. Dividing by eight gives 11.375 bytes, so the final-byte rule stores 12 whole bytes and leaves 5 padding bits. A format that pads every row could be larger.
Understanding common bit depths
An 8 bpp image stores one byte per pixel, commonly used for grayscale values or palette indexes. A 24 bpp RGB image usually stores three 8-bit color channels. A 32 bpp RGBA image often adds an 8-bit alpha channel, though a particular file or graphics API may use a different channel order or representation.
Enter total bits per pixel, not bits per channel. For four 8-bit channels, enter 32. For three 16-bit channels, enter 48. The calculator does not infer channels, palettes, or color quality.
Useful planning scenarios
The raw payload is useful when comparing frame buffers, estimating an uncompressed capture stream before multiplying by frame rate, sizing a simple raster buffer, or teaching how resolution and color depth affect data volume.
For a batch, calculate one image and multiply the exact byte value outside the tool. Keep format overhead and any per-row alignment rule separate so the assumptions remain visible.
Limits and common mistakes
- This result is not a prediction of a JPEG, PNG, WebP, HEIF, TIFF, BMP, or other finished file.
- Headers, palettes, color profiles, thumbnails, metadata, checksums, and compression are excluded.
- Row padding is excluded; only the final byte of the complete payload is rounded up.
- Application memory may include row pitch, GPU alignment, multiple buffers, decoded copies, or mipmaps.
- PPI and print size do not change bytes when pixel width, height, and bpp stay the same.
Using the copied result
Copy result produces a short summary of the confirmed dimensions, bit depth, bytes, MB, and MiB. Keep the phrase “uncompressed pixel data” in a specification so readers do not mistake the value for a guaranteed file size. Recalculate after changing any input.
Frequently asked questions
Why is my PNG or JPEG much smaller?
Those formats can compress pixel patterns and add format-specific structures. This tool calculates only uncompressed pixel payload.
Why can a BMP or TIFF be larger?
A format may add headers, metadata, palettes, per-row alignment, or additional image data.
Should I enter 8 or 24 for RGB?
For ordinary three-channel 8-bit RGB, enter 24 total bits per pixel. Eight would describe one byte total per pixel.
Why are MB and MiB different?
MB divides bytes by 1,000,000. MiB divides by 1,048,576.
Does changing DPI change the result?
Not if pixel dimensions remain unchanged. DPI affects intended physical display or print size, not this pixel payload.