Image size and megapixel calculator
Multiply width, height and color depth to see how many bytes an image needs before any compression. Compressed formats store the same picture in fewer bytes; how many fewer depends on the picture.
Enter the image
Uncompressed image size
Loading the calculator…
How to use it
- Pick a preset or type the width and height in pixels.
- Choose the color depth, the number of bits stored for each pixel.
- Read the size in bytes, in decimal and binary units, and the megapixel count.
The formula
bytes = width x height x bits per pixel / 8 megapixels = width x height / 1,000,000
Eight bits make one byte, so dividing by 8 turns bits into bytes. One megapixel is one million pixels.
Worked example
A 1,920 × 1,080 image has 2,073,600 pixels. At 24 bits per pixel that is 2,073,600 × 24 = 49,766,400 bits, and ÷ 8 = 6,220,800 bytes. That is 6.22 MB in decimal units, or 5.93 MiB in binary units. The image is 2.0736 megapixels.
What it assumes
- Only raw pixel data is counted: no file header, metadata, thumbnail or color profile.
- Every pixel uses the same number of bits.
- One megapixel is one million pixels.
Limits
- Real image files are usually smaller, because formats such as JPEG, PNG and WebP compress the data. How much smaller depends on the picture and the format. Use the compression ratio calculator once you know both sizes.
- Camera raw files and animated images are not modeled.
This is an estimate. The result is an estimate of raw pixel data, not the size of any specific file.
Your numbers stay here
The math runs in your browser and nothing you type is sent to us. Your last calculation is saved in your browser (localStorage) so the calculator is filled in when you return. Press Reset to clear it. See the privacy policy.





