Megapixels, in plain numbers:
from width and height to print size
Turn pixel dimensions into megapixels, and then into a real print size, so you can tell whether a photo is big enough.
Calcylator Editorial Team
Updated · 5 min read
Pixels to megapixels in one step
A megapixel is simply one million pixels. Multiply the width of an image in pixels by its height and divide by 1,000,000 to get the figure printed on camera boxes and phone spec sheets.
- width:
- horizontal pixel count
- height:
- vertical pixel count
Width
6000 px
Height
4000 px
Resolution
24 MP
6000 × 4000 = 24,000,000 pixels.
The same sum works backwards. If a spec says 12 MP at a 4:3 shape, the sides are about 4000 × 3000. Checking the actual dimensions of a file in its properties is the quickest way to learn what you really have, since a cropped or downsized copy no longer matches the camera's headline number.
How large can you print it?
Print size depends on how many pixels you pack into each inch. The target is expressed in PPI (pixels per inch), often confused with DPI, which strictly describes printer ink dots. Divide each pixel dimension by the PPI to get inches, then multiply by 2.54 for centimetres.
- pixels:
- image width or height in pixels
- PPI:
- pixels per inch; 300 is the usual target for close viewing
Image
6000 × 4000 px
Target
300 PPI
Print size
20 × 13.33 in (50.8 × 33.9 cm)
6000 ÷ 300 = 20 in; 4000 ÷ 300 = 13.33 in. At 150 PPI the same file gives 40 × 26.67 in, with visibly less crispness up close.
Posters seen from a metre or more away do not need 300 PPI, which is why a lower density is acceptable for large prints. Your print shop will state a minimum; use that over a generic rule.
Aspect ratio decides the actual dimensions
Megapixels alone do not fix the width and height; the aspect ratio does. The same 12 MP count gives different shapes, found by taking the square root of pixels × ratio for the width.
| Aspect ratio | Width × height for 12 MP | Common use |
|---|---|---|
| 4 : 3 | 4000 × 3000 | Phone and compact cameras |
| 3 : 2 | 4243 × 2828 | Mirrorless and DSLR sensors |
| 16 : 9 | 4619 × 2598 | Video frames and widescreen |
Aspect ratio also explains why cropping costs more than expected. Take the 6000 × 4000 frame (24 MP, 3:2) and crop it to 16:9 by keeping the full width: 6000 × 3375 is 20.25 MP, so about 16 percent of the pixels are gone before you zoom in at all. Frame loosely if you know a crop is coming.
Working backwards from the print you want
Start from the finished size and the PPI, then multiply. For an 8 × 10 inch print at 300 PPI you need 2400 × 3000 pixels, which is 7.2 MP.
| Print size | At 300 PPI | Megapixels needed |
|---|---|---|
| 4 × 6 in | 1200 × 1800 | 2.2 MP |
| 8 × 10 in | 2400 × 3000 | 7.2 MP |
| 12 × 18 in | 3600 × 5400 | 19.4 MP |
| A3 (11.7 × 16.5 in) | 3510 × 4950 | 17.4 MP |
These are minimums for the full frame. If you must crop, count only the pixels that survive the crop, not the original size.
Why more megapixels is a smaller gain than it sounds
Detail grows with the linear number of pixels, not the area. Going from 12 MP to 24 MP doubles the pixel count but increases the width by only the square root of two, about 1.41 times. A jump from 12 to 24 MP lets you crop or enlarge a bit more, and that is all.
Sensor and lens quality, focus, motion blur and noise usually matter more than the headline number. A sharp 12 MP frame from a good lens beats a soft 48 MP one for most uses, and phone cameras often combine several pixels into one for exactly this reason.
Sizing for screens and the web
Screens are a lower bar than print. A 1920 × 1080 display shows about 2.07 MP, and even a 4K panel shows about 8.3 MP, so a full-screen image never needs more. For a banner that occupies 1200 px of layout width, a 2× high-density display wants 2400 px across, which for a 16:9 crop is 2400 × 1350, or about 3.2 MP.
Serving a 24 MP original to a phone wastes bandwidth and slows the page without any visible gain. Resize to the largest size you will actually display, keep the master safe, and let responsive image sets provide a couple of smaller alternatives.
Megapixels and file size
Uncompressed, every pixel in an 8-bit RGB image takes 3 bytes, so a 24 MP image would be 72 MB in memory. JPEG and WebP compress that down by an order of magnitude depending on detail, which is why real files run a few megabytes.
- Raw files keep more data per pixel and are bigger, but they are not the same thing as pixel count.
- Web images rarely need more than twice their displayed width, so a 1200 px wide banner does not need to be 6000 px.
- Oversized originals slow pages down and waste bandwidth without improving what viewers see.
Mistakes that waste pixels or ruin prints
- Editing the DPI tag. Changing a file's stored density from 72 to 300 relabels the same pixels; the 6000 × 4000 image is still 24 MP and still prints 20 inches wide at 300 PPI, however it is tagged.
- Upscaling to hit a number. Enlarging a 2400 × 1600 photo to 6000 × 4000 gives more pixels but no more detail, only smoother guesses between the real ones.
- Trusting a headline figure. Many phones capture a 48 MP or 50 MP frame yet save 12 MP by default, because several sensor pixels are merged into one for cleaner light.
- Forgetting bleed and trim. A print order needs a few millimetres of extra image beyond the final edge, so the true requirement is slightly larger than the finished size.
Distance changes the standard as well. A business card is held close and wants 300 PPI, while a roadside hoarding is seen from tens of metres and is routinely produced at a small fraction of that. Ask your printer for the PPI at final size before you decide that an image is too small.
Common questions
How do you calculate megapixels from resolution?
Multiply width by height in pixels and divide by 1,000,000. An image that is 4000 × 3000 pixels has 12,000,000 pixels, so it is 12 MP. This works for any dimensions, cropped or not.
How many megapixels do I need for an 8 × 10 print?
About 7.2 MP at 300 PPI, since 8 inches × 300 is 2400 pixels and 10 inches × 300 is 3000 pixels. Most modern phones and cameras clear that comfortably, as long as you do not crop heavily.
What is the difference between PPI and DPI?
PPI counts pixels per inch in an image or screen. DPI counts printed ink dots per inch, which is a printer property. People use them loosely, but when sizing a photo for print, PPI is the number to work with.
Does a higher megapixel count mean a better photo?
Not by itself. Doubling megapixels raises linear detail by only about 41 percent. Lens quality, sensor size, lighting and focus affect sharpness more, so compare real samples, not spec sheets.
How big can I print a 12 megapixel photo?
A 4000 × 3000 pixel photo prints at 13.3 × 10 inches at 300 PPI, or about 20 × 15 inches at 200 PPI. Viewing distance decides how low you can go before softness is noticeable.
Was this guide helpful?
Continue reading
View all blogsPagination Math: How Many Pages and Offsets?
Pages = ceil(total ÷ page size). 1,037 records at 25 per page is 42 pages, and the last holds just 12. Offsets and edge cases explained.
5 min read
Base64 Size Overhead: Why It Adds a Third
Base64 turns every 3 bytes into 4 characters, so encoded length is 4 × ceil(n ÷ 3). One million bytes becomes 1,333,336 characters, about 33% more.
5 min read
Binary to Decimal Conversion, Step by Step
Convert binary to decimal by adding the place values of each 1: 101101 is 32 + 8 + 4 + 1 = 45. Includes the doubling shortcut and an IP address example.
5 min read




