Megapixel Calculator
Convert pixel dimensions to megapixels, and work out the dimensions needed to hit a megapixel target at any aspect ratio. Calculated in your browser.
Resolution
-
Show the math
One megapixel is one million pixels:
megapixels = (width × height) ÷ 1,000,000
To hit a megapixel target at a chosen ratio, the height is √(total × ratioH ÷ ratioW) and the width follows from the ratio.
Everything is calculated in your browser.
What this does
A megapixel calculator converts pixel dimensions to megapixels, and works out the dimensions needed to hit a megapixel target at any aspect ratio.
How to use it
- Enter the width and height.
- Read the megapixels.
- Or set a megapixel target.
- Read the dimensions at your ratio.
How it works
One megapixel is one million pixels. For a target at a ratio, height = √(total pixels × ratioH ÷ ratioW) and the width follows from the ratio.
MP = width × height ÷ 1,000,000
Understanding your result
Megapixels measure total resolution, not quality, more pixels let you print larger or crop harder, but sensor size, lens, and light matter just as much for how a photo actually looks. Use the figure to judge whether a file has enough resolution for an intended print or crop, and remember doubling the megapixels only increases linear dimensions by about 40 percent.
Example
6000×4000 px is 24 megapixels.
Sources & methodology
Last updated .
Frequently asked questions
How are megapixels calculated?
One megapixel is one million pixels: megapixels = (width × height) ÷ 1,000,000.
How do I find dimensions for a megapixel target?
At a chosen ratio, the height is √(total pixels × ratioH ÷ ratioW) and the width follows from the ratio.
Is anything uploaded?
No. Everything is computed in your browser — nothing you enter is sent anywhere.
Related tools
Aspect Ratio Calculator
Reduce any width and height to a clean aspect ratio, and resize to a target ratio by solving the missing width or height. Calculated in your browser.
Print Size & DPI Calculator
Convert pixel dimensions to print size in inches and centimetres at any DPI, find the pixels needed for a target print, and check the effective DPI. Calculated in your browser.
Depth of Field Calculator
Find the near limit, far limit and total depth of field for any focal length, aperture and focus distance, with the hyperfocal distance for your sensor. Calculated in your browser.
Hyperfocal Distance Calculator
Work out the hyperfocal distance for a focal length and aperture on your sensor — focus there for maximum depth of field from front to infinity. Calculated in your browser.