CalcDuck

Megapixel Calculator

Megapixel Calculator

What do you want to do?
px
px
DPI
Dots per inch — 300 is the standard photo-print quality target.
Megapixels
12
Aspect ratio
4:3
Max print width at that DPI
13.33
Max print height at that DPI
10

Megapixels are simply the total pixel count divided by one million: width × height ÷ 1,000,000. A 4000×3000 pixel image is exactly 12 megapixels at a 4:3 aspect ratio, and at 300 DPI (standard photo-print quality) it can print at up to 13.3 × 10 inches without upscaling.

Tip: “Copy with settings” shares a link that opens this calculator with your numbers already filled in.

How this calculator works

A megapixel is one million pixels. This calculator converts between an image's pixel dimensions and its total megapixel count, simplifies the width-to-height ratio to a familiar name (4:3, 16:9, 3:2, and so on), and estimates the largest size the image can be printed at a given print quality (DPI, dots per inch) without upscaling.

It also works in reverse: given a target megapixel count and an aspect ratio, it solves for the matching pixel width and height — useful when a camera, sensor, or export setting only states megapixels and you need actual pixel dimensions.

The formulas

Megapixels: MP = (width × height) ÷ 1,000,000Aspect ratio: simplify width : height to lowest terms using the greatest common divisorMax print size at a given quality: print width = width ÷ DPI, print height = height ÷ DPI (in inches)Solving for dimensions: height = √((MP × 1,000,000) ÷ (ratio width ÷ ratio height)), width = height × (ratio width ÷ ratio height)

DPI (dots per inch) is the print-quality setting; 300 DPI is the widely used standard for sharp photo prints viewed up close, while lower DPI values produce larger but softer-looking prints.

Worked example: a 4000×3000 pixel photo at 300 DPI

  1. Megapixels: (4000 × 3000) ÷ 1,000,000 = 12,000,000 ÷ 1,000,000 = 12.0 MP.
  2. Aspect ratio: 4000:3000 simplifies (divide both by their GCD, 1000) to 4:3.
  3. Max print width at 300 DPI: 4000 ÷ 300 ≈ 13.33 inches. Max print height: 3000 ÷ 300 = 10 inches.
  4. So a 12 MP, 4:3 photo can print at roughly 13.3 × 10 inches at full 300 DPI photo quality.

Frequently asked questions

Does more megapixels always mean a better photo?

Not necessarily. Megapixels only measure resolution (detail captured), not sensor size, lens quality, or noise performance — a larger sensor with fewer megapixels often produces cleaner images in low light than a smaller sensor with more megapixels.

How many megapixels do I need to print a certain size?

Multiply the target print width and height in inches by your target DPI, then multiply those two pixel counts and divide by a million. For an 8×10 inch print at 300 DPI, that's (8×300) × (10×300) = 2400 × 3000 = 7.2 MP.

Why is my actual resolution slightly different from the megapixels my camera advertises?

Advertised megapixel counts are usually rounded, and the exact pixel width and height must both be whole numbers, so solving backward from a target megapixel count can only get close, not exact — this calculator shows the resulting rounded pixel dimensions and the resulting exact megapixel count together.

What DPI should I use for screens instead of prints?

DPI (or the closely related PPI, pixels per inch) matters for print output; on-screen, what matters is simply the pixel dimensions relative to the display's resolution, since screens don't have a fixed physical dots-per-inch the way ink on paper does.

How many megapixels is a 1920×1080 (Full HD) image?

About 2.1 megapixels. Multiplying the pixel dimensions gives 1920 × 1080 = 2,073,600 total pixels, and dividing by 1,000,000 gives roughly 2.07 MP - the same width × height ÷ 1,000,000 formula used for any resolution. Its aspect ratio also simplifies to the familiar 16:9.

Sources

Related calculators