Image · pixels to bytes

Image file size calculator.

Pixels times bits per pixel is the memory a bitmap takes before compression. Enter the dimensions and colour depth to see it. Runs in your browser; nothing is uploaded.

Advertisement

Your image

Uncompressed size

Fill the form and press Calculate.

Worked example

A 1920 × 1080 image has 2,073,600 pixels (2.0736 MP). At 24 bits (3 bytes) per pixel that is 2,073,600 × 3 = 6,220,800 bytes, or 6.22 MB (5.93 MiB). Adding an 8-bit transparency channel makes it 32 bits per pixel: 8,294,400 bytes, 8.29 MB.

How it works

Uncompressed size = width × height × bits per pixel ÷ 8. MB here means 1,000,000 bytes and MiB means 1,048,576 bytes; operating systems and apps differ in which they show. The result is the size of the raw pixel data only, with no file header, metadata or compression. Real JPEG, PNG and WebP files are compressed, so their sizes depend on the picture and the quality setting and cannot be predicted from the pixel count alone.

FAQ

How do I calculate image size in MB?

Multiply width by height by the bytes per pixel, then divide by 1,000,000. A 1920 × 1080 image at 3 bytes per pixel is 6.22 MB uncompressed.

Why is my JPEG much smaller than this number?

JPEG, PNG and WebP compress the pixel data. This tool shows the uncompressed size, which is usually much larger than the compressed file, not the file size you will get.

What is the difference between MB and MiB?

MB is 1,000,000 bytes. MiB is 1,048,576 bytes. The same file shows a smaller MiB number than MB number.

How many megapixels is my image?

Width times height divided by one million. 1920 × 1080 is about 2.07 megapixels.

Disclaimer

Arithmetic only. Actual file sizes depend on the format, compression and metadata.

Advertisement
Advertisement