A camera, a phone or a monitor is described as "12 megapixels" or "2 megapixels", and you want to know what that number actually counts. A megapixel is one million pixels. It counts the tiny squares that make up a picture. It says nothing about how large the picture prints, and nothing directly about the file size in megabytes.

This guide shows how to turn any width and height into megapixels, how to connect that number to an uncompressed file size, and why a bigger count does not always mean a sharper picture.

The formula: count the pixels, divide by a million

The prefix "mega" means one million. NIST lists it as the factor 10^6, so one megapixel is exactly 1,000,000 pixels. A federal digitization guide gives the same definition: a megapixel is one million pixels, abbreviated MP.

The pixel count of a rectangular image is its width times its height. That gives the formula:

megapixels = width × height ÷ 1,000,000

For 1920 × 1080: 1,920 × 1,080 = 2,073,600 pixels, so the image is 2.0736 MP. The same pixel grid is the HDTV picture format listed in Recommendation ITU-R BT.709, which specifies 1,920 samples per line and 1,080 active lines. The image file size calculator shows the megapixels and the uncompressed size at once.

Example dimensions Aspect ratio Total pixels Megapixels Uncompressed at 24 bits per pixel
1280 × 720 16:9 921,600 0.9216 2,764,800 bytes
1920 × 1080 16:9 2,073,600 2.0736 6,220,800 bytes
2560 × 1440 16:9 3,686,400 3.6864 11,059,200 bytes
3840 × 2160 16:9 8,294,400 8.2944 24,883,200 bytes
4000 × 3000 4:3 12,000,000 12 36,000,000 bytes
6000 × 4000 3:2 24,000,000 24 72,000,000 bytes

These dimensions are examples chosen for round arithmetic. They are not a list of the most common sizes.

From megapixels to file size

An uncompressed image stores a fixed number of bits for every pixel, so its size follows directly from the pixel count: bytes = pixels × bits per pixel ÷ 8. At 24 bits per pixel, each pixel takes 3 bytes, which gives a shortcut: uncompressed megabytes equal megapixels times 3.

Worked example. Example: a 12-megapixel image, 4000 × 3000, at 24 bits per pixel.

  1. Pixels: 4,000 × 3,000 = 12,000,000.
  2. Bytes: 12,000,000 × 24 ÷ 8 = 36,000,000 bytes.
  3. In decimal units that is 36 MB. In binary units it is 36,000,000 ÷ 1,048,576 = 34.33 MiB.

The shortcut agrees: 12 MP × 3 = 36 MB.

The shortcut changes with the bits per pixel. At 32 bits, each pixel takes 4 bytes, so the same 12 MP image needs 12,000,000 × 4 = 48,000,000 bytes. At 8 bits it needs 12,000,000 bytes. Only the multiplier moves; the pixel count stays the same.

The federal guide describes the same proportion: file size grows with the number of pixels. A saved JPEG or PNG is usually smaller than this baseline, and by how much depends on the picture and the format, as covered in JPEG vs. PNG. The bits-per-pixel part of the formula is explained in color depth explained, and uncompressed image size walks through the full calculation.

Why doubling the megapixels does not double the detail

Pixels are counted over an area, so the count grows with the square of the side length. Halve both the width and the height and you keep a quarter of the pixels: 4000 × 3000 becomes 2000 × 1500, which is 3,000,000 pixels, or 3 MP. Four times fewer pixels from a change that sounds like "half".

The reverse works the same way. To double the pixel count of a 12 MP image while keeping its shape, multiply each side by the square root of 2, about 1.414:

  • 4,000 × 1.414 ≈ 5,657
  • 3,000 × 1.414 ≈ 4,243
  • 5,657 × 4,243 = 24,002,651 pixels, about 24 MP

So going from 12 MP to 24 MP adds only about 41% to each side. The federal guide adds a second caution: more pixels generally record more fine detail, but not always. The actual detail depends more on the capture device's performance, the image processing and the subject itself.

Working backward: from a megapixel figure to dimensions

Sometimes you know only the megapixel figure and the shape of the picture. You can recover the dimensions. For a shape a:b, the width divided by the height equals a ÷ b, and width times height equals the pixel count. Solving the two together gives:

height = √(pixels × b ÷ a) and width = height × a ÷ b

Worked example. Example: an 8 MP image with a 16:9 shape.

  1. Pixels: 8 × 1,000,000 = 8,000,000.
  2. Height: √(8,000,000 × 9 ÷ 16) = √4,500,000 ≈ 2,121.3.
  3. Width: 2,121.3 × 16 ÷ 9 ≈ 3,771.2.
  4. Whole pixels: 3,771 × 2,121 = 7,998,291, which is about 8 MP.

Because pixels come in whole numbers, the result is approximate. A 12 MP image with a 4:3 shape works out evenly: height √(12,000,000 × 3 ÷ 4) = √9,000,000 = 3,000, and width 4,000.

How a shape like 16:9 is reduced and used is the subject of aspect ratios explained.

Pixels in a sensor, in a file and on a screen

The word "pixel" covers different things. The federal guide notes that it can mean a component of a digital image or a light-sensing cell in a camera sensor, and that a device's megapixel count normally describes its sensor. A file you receive has its own width and height, and those are the numbers the formula needs.

A screen has a pixel count too. A 1920 × 1080 display has 2,073,600 pixels. A 12 MP photograph has 12,000,000 ÷ 2,073,600 = 5.79 times as many, so it must be scaled down to fit. Choosing image dimensions for the web shows how to avoid sending pixels that the screen cannot use.

For printing, the question flips: how many pixels does a given print size need? That depends on pixels per inch, covered in PPI vs. DPI. Example: an 8 × 10 inch print at an assumed 300 pixels per inch needs 2,400 × 3,000 = 7,200,000 pixels, or 7.2 MP.

Common mistakes

  • Confusing megapixels with megabytes. One counts pixels, the other counts bytes. A 12 MP image is 36 MB uncompressed at 24 bits per pixel, and far less after compression.
  • Using 1,048,576 for "mega". That number is 2^20, the value behind the binary unit MiB. One megapixel is 1,000,000 pixels, so using 1,048,576 overstates the count by about 4.9%.
  • Expecting detail to scale with the count. Doubling the pixels adds about 41% to each side, and sharpness also depends on optics, processing and the subject.
  • Upscaling to raise the number. Resizing a small image to larger dimensions creates more pixels but no new information. The count goes up, and the detail stays the same.
  • Comparing counts across shapes without looking at dimensions. A 4:3 and a 3:2 image can both be 12 MP and still have different widths and heights. Check the dimensions before comparing.

FAQ

How many megapixels is 1920 × 1080?

It is 2,073,600 pixels, or 2.0736 MP, usually rounded to 2.1 MP.

How many pixels are in one megapixel?

Exactly 1,000,000. NIST defines the prefix mega as 10^6.

Does a higher megapixel count mean a bigger file?

Uncompressed, yes: the size is proportional to the pixel count. After JPEG or PNG compression, the size also depends on the content of the picture, so two images with the same count can differ widely.

How many megapixels do I need for a print?

Multiply the print size in inches by the pixels per inch you want, then divide the total by a million. The example above shows the steps for an 8 × 10 print.

Sources

  1. NIST, Metric (SI) Prefixes. Accessed November 6, 2026.
  2. Federal Agencies Digital Guidelines Initiative (FADGI), Technical Guidelines for Digitizing Cultural Heritage Materials: Third Edition. Accessed November 6, 2026.
  3. ITU-R, Recommendation ITU-R BT.709-6: Parameter values for the HDTV standards for production and international programme exchange. Accessed November 6, 2026.