PRINT & MEDIA CALCULATOR

Bitmap File Size Calculator

Calculate uncompressed pixel storage from dimensions and bit depth, with optional BMP row alignment.

Calculator

px
px
YOUR RESULTS
Uncompressed pixel data6,220,800 bytes
Uncompressed pixel data
6.2208 MB
Uncompressed pixel data
5.932617 MiB
Bytes per stored row
5,760 bytes
Additional row padding
0 bytes

Page guide

Pixel bytes and aligned row stride

Bytes are exact for the selected uncompressed layout. MB is decimal and MiB is binary. Padding shows additional bytes added after each packed row in the BMP alignment mode, not a compression overhead estimate.

The formula

Packed row bytes = ceiling(width × bits per pixel/8). BMP row stride = ceiling(width × bits per pixel/32) × 4. Pixel data bytes = row stride × height.

Pixel bit depth is total bits per pixel, not bits per channel. Packed rows round to a complete byte; BMP-style rows also align to four-byte boundaries. The calculation reports pixel storage only and excludes file headers and color tables.

Worked example

A 1,920 by 1,080 image at 24 bits per pixel has 5,760 bytes per row with no extra BMP padding. Pixel data totals 6,220,800 bytes, or 6.2208 MB and 5.932617 MiB. A one-pixel-wide, two-row 24-bit BMP uses 8 pixel-data bytes because each 3-byte row is padded to 4.

How to use this calculator

  1. Enter image width, image height using the units shown.
  2. Set bits per pixel, pixel layout.
  3. Calculate and review uncompressed pixel data alongside the supporting quantities.

Bit depth describes stored pixels

A 24-bit RGB pixel typically has three 8-bit channels, while a 32-bit storage format uses four bytes per pixel. Indexed formats may need a palette stored separately. Camera RAW files can have different packing, metadata, and compression rules, so their final file size is not determined by this generic RGB-style pixel calculation.

Image files include more than the pixels

A BMP file has headers and may include masks, profiles, or color tables; those are excluded from the pixel-data result. PNG, JPEG, WebP, and other compressed formats depend on image content and encoding choices. This tool does not predict their compressed sizes or decode a file. It estimates the memory or uncompressed storage represented by the dimensions and layout.

Assumptions & limitations

What this calculation assumes

  • Rows use the selected packed-byte or BMP four-byte alignment convention.

What to keep in mind

  • Excludes headers, palettes, profiles, compression, and hardware-specific alignment.

Common questions

Does this predict JPEG size?

No. JPEG size depends on image content and compression settings, not just dimensions and bit depth.

Why does a narrow BMP need padding?

Uncompressed RGB BMP rows are aligned to four-byte boundaries, so some widths require unused bytes at the end of each row.

Is bit depth per pixel or per channel?

Use total bits per pixel. Three channels with eight bits each use 24 bits per pixel.

Sources & further reading

Reviewed on