Image File Size Calculator

Megapixels and uncompressed size from pixel dimensions and depth.

Technology and NetUpdated 2026-10-112 min read
Image File Size Calculator
Megapixels
...
Uncompressed...
Decimal MB...

What it does

Every digital photo is a grid of pixels with a fixed cost per pixel. A 1200 by 1600 shot holds 1,920,000 pixels, and at 24 bit color each pixel costs 3 bytes, so the raw data runs 5,760,000 bytes. Compression shrinks saved files, but memory, uploads, and raw captures follow the full figure.

The tool above runs that math for any size. Enter width and height in pixels, pick the bit depth, and it prints megapixels, binary MiB, and decimal MB. The default photo frame gives 1.92 MP at 5.49 MiB (5.76 MB); a 4K frame at 3840 by 2160 runs 8.29 MP at 23.73 MiB.

Standards fix each factor. The W3C PNG spec defines the byte as 8 bits with sample depths of 1 to 16 bits, NIST defines the MiB as 1,048,576 bytes against the decimal MB, and the Library of Congress preservation guides prefer high resolution 24 bit RGB over 8 bit indexed for still images.

Bit depth is the quality lever. One bit suits line art, 8 covers gray and indexed color, 24 covers normal photos, and 32 adds an alpha channel for transparency. Each step up multiplies the file: the same pixels at 48 bit cost twice the 24 bit size.

How to use

  1. Enter the image width in pixels.
  2. Enter the image height in pixels.
  3. Pick the bit depth: 24 for normal color photos.
  4. Read megapixels first, then MiB and MB uncompressed.
  5. Compare with the saved file size to see compression at work.
  6. For scans, divide flatbed dpi by print inches to get pixels first.

Formula

Pixels = width x height. MP = pixels / 1,000,000. Bytes = pixels x bit depth / 8. MiB = bytes / 1,048,576. MB = bytes / 1,000,000.
width
Image width in pixels, 1 to 100000.
height
Image height in pixels, 1 to 100000.
depth
Bits per pixel: 1, 8, 24, 32, or 48.
MiB
1,048,576 bytes, the binary megabyte per NIST.

One byte is 8 bits by definition. Depths follow the PNG spec range of 1 to 16 bits per sample across its color types.

Worked example

Example: 1200 x 1600 at 24 bit

Defaults: 1200 by 1600 px, 24 bit RGB (8 bits times 3 channels).

  1. Inputs: 1200 x 1600 px at 24 bit RGB.
  2. Pixels: 1200 x 1600 = 1,920,000.
  3. Megapixels: 1,920,000 / 1,000,000 = 1.92 MP.
  4. Bytes: 1,920,000 x 24 / 8 = 5,760,000.
  5. MiB: 5,760,000 / 1,048,576 = 5.49. MB: 5.76. Tool shows 1.92 MP, 5.49 MiB, 5.76 MB.

Reference table

Frame sizes at 24 bit uncompressed
FrameMPMiB
640 x 480 VGA0.310.88
1920 x 1080 Full HD2.075.93
3840 x 2160 4K8.2923.73
6000 x 400024.068.66

Limits

  • Uncompressed math only. Compression ratios sit outside the numbers.
  • Ignores headers, thumbnails, and metadata overhead.
  • Assumes full frames; crops need their own dimensions.
  • Print size needs dpi too, which this page does not cover.

Common mistakes

  • Mixing MiB and MB when sizing uploads.
  • Forgetting alpha: RGBA at 32 bit costs a third more than RGB.
  • Using megapixels alone to guess file weight across depths.
  • Reading compressed JPEG size as sensor data size.
  • Scanning at low dpi then blaming pixel math.

Try it yourself

Quick checks. Answers sit tucked under each question.

2400 x 3000 at 24 bit?

7,200,000 px = 7.2 MP. Bytes 21,600,000 = 20.6 MiB = 21.6 MB.

640 x 480 VGA at 24 bit?

307,200 px = 0.31 MP. Bytes 921,600 = 0.88 MiB = 0.92 MB.

Questions

What is a megapixel?

Total pixels divided by one million. A 1200 x 1600 shot is 1.92 MP.

How is uncompressed size figured?

Width times height times bit depth over 8. At 24 bit that is 3 bytes per pixel.

MiB versus MB: what differs?

1,048,576 bytes (binary) versus 1,000,000 bytes (decimal). The tool prints both: 5.49 MiB and 5.76 MB here.

What do the bit depths mean?

Bits per pixel: 1 bitonal, 8 gray or indexed, 24 RGB, 32 RGBA, 48 deep color. Deeper files hold smoother tones at bigger sizes.

Are saved files smaller?

Yes, often far smaller. JPEG and PNG compress; raw, BMP, and TIFF run near the full uncompressed figure.

What do archives prefer?

The Library of Congress prefers high resolution with 24 bit RGB over 8 bit indexed, and 16 bit per channel over 8 where kept.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.