Home › Image Tools › Megapixel Calculator

Megapixel Calculator

Find out how many megapixels an image has from its width and height, or work out the pixel dimensions behind a camera's MP rating. You also get the aspect ratio, the largest sharp print size and the quality at common print sizes.

Last updated:

What do you want to calculate?
px
px
MP
DPI

Shown alongside 300 and 150 DPI.

Enter your values to see the result.
Advertisement
Advertisement

How to use the Megapixel Calculator

  1. Choose a mode: megapixels from width × height, or pixel dimensions from a megapixel count.
  2. Enter the pixels (for example 6000 × 4000), or the MP rating plus the aspect ratio and orientation.
  3. Click Calculate megapixels (results also update as you type).
  4. Read the results: megapixels or dimensions, aspect ratio and the largest print at 300 and 150 DPI.
  5. Check the print table to see how sharp the image will be at 4 × 6 up to 24 × 36 inches, and download it as CSV.

Megapixel formulas

  • Megapixels = width (px) × height (px) ÷ 1,000,000
  • Width from MP = √(MP × 1,000,000 × a ÷ b) for an a:b aspect ratio
  • Height from MP = width × b ÷ a
  • Aspect ratio = width : height, both divided by their greatest common divisor
  • Max print size = pixels ÷ DPI (inches), × 2.54 for centimeters

Worked example: a phone photo of 4032 × 3024 pixels has 12,192,768 pixels, or 12.2 MP. The greatest common divisor of 4032 and 3024 is 1008, so the ratio is 4:3. At 300 DPI it prints sharply up to 13.44 × 10.08 inches (34.1 × 25.6 cm).

Common resolutions in megapixels

FormatPixelsMegapixelsRatioPrint at 300 DPI
VGA640 × 4800.3 MP4:32.1 × 1.6 in
HD 720p1,280 × 7200.9 MP16:94.3 × 2.4 in
Full HD 1080p1,920 × 1,0802.1 MP16:96.4 × 3.6 in
QHD 1440p2,560 × 1,4403.7 MP16:98.5 × 4.8 in
4K UHD3,840 × 2,1608.3 MP16:912.8 × 7.2 in
DCI 4K4,096 × 2,1608.8 MP256:13513.7 × 7.2 in
12 MP phone (4:3)4,032 × 3,02412.2 MP4:313.4 × 10.1 in
24 MP APS-C / full frame (3:2)6,000 × 4,00024.0 MP3:220.0 × 13.3 in
8K UHD7,680 × 4,32033.2 MP16:925.6 × 14.4 in
45 MP full frame (3:2)8,256 × 5,50445.4 MP3:227.5 × 18.3 in
48 MP phone (4:3)8,000 × 6,00048.0 MP4:326.7 × 20.0 in
100 MP medium format (4:3)11,648 × 8,736101.8 MP4:338.8 × 29.1 in

Camera rows are typical examples; exact pixel dimensions vary by model, so check your own photo's width and height for a precise figure.

What megapixels do and don't tell you

  • Resolution grows with the square root. Going from 12 MP to 48 MP is four times the pixels but only twice the width and height, so prints can be twice as wide, not four times.
  • Cropping costs pixels fast. Cropping a photo to half its width and half its height keeps only a quarter of the megapixels. A 24 MP image cropped that way becomes 6 MP.
  • Aspect ratio changes the count. Switching a 4:3 sensor to 16:9 mode trims the top and bottom, so a 12 MP phone shoots about 9 MP in 16:9.
  • Pixel binning. Many 48 MP and higher phone cameras combine groups of 4 pixels into one by default, saving 12 MP photos that are cleaner in low light. Use the full-resolution mode when you need the extra detail.
  • More MP is not always sharper. Lens quality, focus, motion blur and sensor size affect real detail as much as pixel count. For screens, even 4K displays show only about 8.3 MP, so most online photos are resized well below camera resolution.

Frequently asked questions

How do you calculate megapixels?

Multiply the image width by its height in pixels and divide by 1,000,000. For example, 4032 × 3024 = 12,192,768 pixels, which is about 12.2 megapixels.

How do I convert megapixels to pixel dimensions?

You also need the aspect ratio. Width = √(MP × 1,000,000 × ratio width ÷ ratio height) and height = width × ratio height ÷ ratio width. A 24 MP image at 3:2 works out to about 6000 × 4000 pixels.

How many megapixels is 4K?

4K UHD video frames are 3840 × 2160 pixels, which is about 8.3 megapixels. DCI 4K used in cinema is 4096 × 2160, about 8.8 MP. Full HD (1920 × 1080) is about 2.1 MP.

Does doubling the megapixels double the print size?

No. Megapixels measure area, so twice the megapixels only makes each side about 1.41 times (the square root of 2) longer. To double both the width and height of a print at the same DPI you need four times the megapixels.

How many megapixels do I need for a good print?

At 300 DPI, which is typical for photo prints held in the hand, a 4 × 6 inch print needs about 2.2 MP, 8 × 10 needs 7.2 MP and 16 × 20 needs 28.8 MP. Large prints viewed from farther away usually look fine at 150–200 DPI, which needs a quarter to under half as many pixels.

Why is my camera's actual megapixel count different from the advertised number?

Manufacturers often round the figure and may quote total sensor pixels, including edge pixels not used in the final image. Shooting in a different aspect ratio, such as 16:9 on a 4:3 phone sensor, crops the image and lowers the real count, so enter your photo's actual width and height for the exact value.

Is a megapixel exactly one million pixels?

Yes. In camera and image specs a megapixel is 1,000,000 pixels (not 1,048,576), so this calculator divides the pixel count by one million.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Print Size CalculatorPrint size from pixels and DPI, max print size by megapixels, and pixels needed for any print.Aspect Ratio CalculatorCalculate image sizes for 16:9, 4:3 and any ratio.PPI CalculatorPixel density (PPI), dot pitch and retina viewing distance from resolution and screen size.Pixels to Inches ConverterConvert pixels to inches, cm and mm at any DPI, find print sizes and calculate screen PPI.Image CompressorShrink images to a target size like 100 KB.Image ResizerResize images to any size without losing quality.Compress Image to 20KBShrink any photo to under 20KB (or any target size).Compress Image to 100KBShrink any photo to under 100KB automatically, with the best quality that fits.Compress JPEG to 50KBShrink photos to under 50KB for forms, passports and exams.Image CropperCrop images, including circle crops for profile pictures.Rotate & Flip ImageRotate images by any angle or mirror them, one or many at once.Collage MakerCombine photos into a grid collage.Image Border AdderAdd a border, rounded corners, matte and shadow to a photo onlineImage SplitterSplit an image into a rows × columns grid of tiles and download them one by one or as a ZIP.Image CombinerCombine images side by side, stacked or in a grid, with spacing, background color and alignment.Image UpscalerEnlarge images 2×, 3× or 4× with Lanczos-3 or bicubic resampling and optional sharpening.Image DPI ChangerChange the DPI of JPG and PNG images without re-encoding, and see the print size.Pixel Art MakerDraw pixel art on an 8 to 64 px grid with palettes, fill and mirror, then export PNG or SVG.Social Media Image ResizerResize photos for Instagram, Facebook, X, LinkedIn, YouTube, TikTok and Pinterest in one go.Image Diff CheckerCompare two images and highlight every changed pixel, with % difference and a swipe slider.Emoji to ImageTurn any emoji into a PNG image from 64 to 1024 px, transparent or on a color, in batch.Text to ImageTurn text into a PNG image with your font, size, colors, padding, alignment and wrapping.SVG OptimizerMinify SVG files: strip metadata, comments and editor junk, round numbers, compare sizes.Compress Image to 200KBShrink any photo to under 200KB automatically, with the best quality that fits.Crop GIFCrop an animated GIF with a draggable box or aspect ratio presets, keeping every frame.Crop Image into ShapeCrop a photo into a heart, star, hexagon, circle, speech bubble or custom SVG shape as a PNG.Drawing Grid MakerPut a numbered grid on a reference photo to copy it by hand. Print it or save as PNG or PDF.Resize GIFResize an animated GIF by width, height or percent, skip frames and compare file sizes.Square Image Maker (No Crop)Make any photo square, 4:5 or 9:16 without cropping, with a color, blur or gradient fill.Text Behind ImagePut text behind the subject of a photo: AI cut-out, fonts, colors, rotation and PNG export.Bulk Image ResizerResize many images at once by width, height, percent or longest side and download a ZIP.JPG to WordTurn photos and scans into an editable Word document with OCR. Batch images, 30+ languages.PNG CompressorShrink PNG files up to 80% with smart color reduction that keeps transparency. Batch + ZIP.Photo Measurement ToolMeasure distances, areas and angles on a photo using a card or ruler in the picture for scale.Pupillary Distance MeasurementMeasure your PD in mm from a webcam or photo with a card for scale, single and dual PD.Brighten ImageBrighten dark photos with auto exposure, shadows lift and highlight protection. Batch, no upload.Change Image Aspect RatioConvert photos to 1:1, 4:5, 16:9, 9:16, 3:2 or any ratio by crop, color padding or blur fill.Crop Photo for PrintCrop photos to 4x6, 5x7, 8x10, 11x14 or A4 print ratios with a DPI quality check, then export.Volleyball Rotation ToolEnter 6 players and a 5-1, 6-2 or 4-2 system to see all rotations and serve receive on a court.Auto Face CropDetect faces and crop centered headshots at any ratio and padding, in batch.Content-Aware Image ResizeResize images with seam carving to keep people and objects intact; protect or remove areas.Scanned Photo SplitterSplit several photos from one flatbed scan: auto-detect, straighten and crop each, then ZIP.Long Screenshot StitcherStitch scrolling screenshots into one long image with automatic overlap detection.Image to Minecraft Pixel ArtConvert any image into Minecraft block pixel art with block counts, stacks and a row-by-row build guide.Pixel Art UpscalerUpscale pixel art and sprites crisply with nearest neighbor, Scale2x/3x or xBR, keeping transparency.Resize Image in CM and InchesResize a photo to an exact print size in cm, mm or inches at any DPI. JPG, PNG or PDF.Online Screenshot ToolCapture your screen, a window or a tab, then crop, annotate and copy or save it as PNG.Trim Image WhitespaceAuto-crop white borders or transparent padding from images with tolerance and margin. Batch.Fix Image OrientationRotate sideways photos upright for good by applying the EXIF orientation to the pixels, in batch.Image Format DetectorFind an image's real format from its magic bytes, see size and bit depth, and fix a wrong extension.Increase Image Size in KBMake a photo's file size bigger (e.g. 50 KB or more) to pass minimum upload limits, with no visible change.
See all 49 Resize, Crop & Compress →