Calculate megapixel

Convert image dimensions to megapixels, print size at DPI, and an uncompressed storage estimate.

freeworks offlinenothing uploaded
ToolMegapixel Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Total pixels equal width × height, megapixels divide by 1,000,000, and DPI converts pixels to printed inches. Estimated bytes multiply total pixels by bits per pixel ÷ 8.

  • 300 DPI and two bytes per pixel are editable estimates.
  • The estimate is raw raster storage, not compressed file size.

Worked example

A 24 megapixel camera
6000x4000 pixels, printed at 300 DPI
Input
											Width px: 6000
Height px: 4000
										
Output
												Megapixels: 24
Print width inches: 20
Print height inches: 13.33
Estimated file size mb: 5.72
											

When to use this

Print workflows check dimensions, camera comparisons use megapixels, and storage planning estimates raw raster memory.

Edge cases

  • A 24 MP image can have widely different JPEG sizes.
  • DPI metadata does not create pixels or optical detail.
  • Bits per pixel must match channel-depth and alpha assumptions.