Megapixel calculator
Enter the width and height in pixels to get megapixels, or enter megapixels and an aspect ratio to get the pixel size. The print sizes show how large the picture can go at three common densities.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose what you know: the pixel size or the megapixel count.
- For megapixels, pick the aspect ratio of the image.
- Read the megapixels or pixel size, and the print size at 300, 240 and 150 ppi in inches or centimetres.
How it works
Megapixels = width × height ÷ 1,000,000. From a megapixel count and an aspect ratio a:b, the width is √(MP × 10⁶ × a ÷ b) and the height is width × b ÷ a, each rounded to whole pixels. Print size is the pixel count divided by the pixels per inch; one inch is 2.54 cm.
Worked example
24 MP at 3:2: width = √(24,000,000 × 1.5) = 6000 and height = 4000. At 300 ppi that prints at 20 × 13.3 in (50.8 × 33.9 cm); at 150 ppi it reaches 40 × 26.7 in.
Tips
- The print size needed to hang a picture on a wall depends on viewing distance more than on the pixel count.
- For exact print requirements by size, use the print size calculator.
Frequently asked questions
How are megapixels calculated?
Multiply the width by the height in pixels and divide by one million. A 6000 × 4000 image has 24 million pixels, so 24 MP.
Why is the pixel size rounded from megapixels?
Camera makers quote rounded megapixels, and the ratio may not divide the total exactly. The calculator rounds each side to a whole pixel, so a real camera can differ by a few pixels.
Which print density should I choose?
300 ppi is the usual standard for sharp prints viewed up close, 240 ppi is still good for most photos, and 150 ppi suits large posters viewed from a distance. These are common guidelines rather than strict limits.
Is a higher megapixel count always better?
Not necessarily. More pixels allow larger prints and cropping, but lens quality, sensor size and noise matter as much for how the picture looks.