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.


Or find dimensions for a megapixel count:

Resolution

-

Total pixels-
Dimensions for megapixel count-

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

  1. Enter the width and height.
  2. Read the megapixels.
  3. Or set a megapixel target.
  4. 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.