MP and pixel calculator

Megapixel to resolution calculator

Turn a megapixel target and aspect ratio into pixel width and height. Switch direction to calculate the exact megapixels, pixel count and ratio of an existing resolution.

Convert megapixels and resolution

Calculated locally
Conversion direction
One megapixel equals 1,000,000 pixels.
Common megapixel targets
Nearest whole-pixel resolution
6,000 × 4,000 px
Megapixels 24 MPRatio 3:2Orientation Landscape
Total pixels24,000,000
Decimal ratio1.5000
Long edge6,000 px
Short edge4,000 px
This resolution matches 24 MP and 3:2 exactly.

How to convert megapixels to resolution

Megapixels describe the total number of pixels, but they do not determine width and height by themselves. The same 24 million pixels can form a landscape, portrait or square image. An aspect ratio supplies the missing shape so the two dimensions can be calculated.

total pixels = megapixels × 1,000,000
width = √(total pixels × aspect ratio)
height = √(total pixels ÷ aspect ratio)

Pixel dimensions must be whole numbers. The calculator rounds the mathematical width and height to the nearest pixels, then reports the actual pixel count and any tiny difference from the requested MP value.

Example: 24 MP at 3:2

A 3:2 landscape image has a decimal ratio of 1.5. For a 24 MP target, the calculation produces exactly 6000×4000 pixels:

6,000 × 4,000 = 24,000,000 pixels = 24 MP

Changing only the ratio changes both dimensions even though the total megapixel target remains the same.

Convert resolution to megapixels

For the reverse calculation, multiply pixel width by pixel height and divide by one million. A 3840×2160 4K UHD frame contains 8,294,400 pixels, which equals 8.2944 MP.

megapixels = width × height ÷ 1,000,000

Switch to “Resolution → MP” above to calculate the exact value for any dimensions.

Common resolutions and megapixel counts

ResolutionPixelsMegapixelsRatio
1920 × 10802,073,6002.0736 MP16:9
2560 × 14403,686,4003.6864 MP16:9
3840 × 21608,294,4008.2944 MP16:9
4000 × 300012,000,00012 MP4:3
6000 × 400024,000,00024 MP3:2
7680 × 432033,177,60033.1776 MP16:9

Megapixels, resolution and aspect ratio

Megapixels

The total pixel count expressed in millions. It measures how many pixels are present, not how they are arranged.

Resolution

The exact pixel matrix written as width × height, such as 6000×4000.

Aspect ratio

The proportional shape of that matrix. Both 6000×4000 and 3000×2000 share the same 3:2 ratio.

Why camera numbers may differ

A marketed megapixel value is often rounded, while an exported photo has exact integer dimensions. For example, 4032×3024 contains 12,192,768 pixels, or about 12.19 MP, even when the shooting mode is described as 12 MP.

Use the reverse calculator when you need the exact count of a real file. If you have the image itself, the image aspect ratio calculator can read its dimensions locally.

What megapixels do—and do not—tell you

Room to crop

More source pixels can leave more pixels after cropping, provided the original detail is actually captured.

Output dimensions

MP and aspect ratio can estimate a pixel matrix, but rounding means many nearby resolutions can have almost the same MP count.

Not image quality alone

Pixel count does not measure focus, lens performance, noise, compression or processing quality.

Frequently asked questions

How many pixels are in one megapixel?

One megapixel equals 1,000,000 pixels. It is a decimal unit, so the calculation does not use 1,048,576.

Can one megapixel value have several resolutions?

Yes. Megapixels specify total pixel count, not shape. You need an aspect ratio to estimate width and height, and several nearby whole-pixel pairs can have almost the same total.

Why is the result slightly above or below my target?

The ideal dimensions can contain fractions of a pixel. Rounding both sides to whole pixels creates a very small difference, which the result card reports.

Is 4K exactly 8 megapixels?

3840×2160 UHD contains 8,294,400 pixels, or 8.2944 MP. “4K” describes a resolution family rather than an exact megapixel count.

Does a higher megapixel count always mean a better image?

No. It means a larger pixel count. Captured detail and visible quality also depend on factors such as focus, optics, sensor performance, processing and compression.

Does this calculator upload an image?

No. The tool uses only the numbers you enter and performs every calculation in your browser.

Related tools and ratio guides