Width × height → megapixels, aspect ratio, file size, and max print size at any DPI. Reverse it too. 100% in your browser.
- Runs locally
- Category Calculator
- Best for Checking file type, size, metadata, and obvious mismatch signals before sharing.
Image resolution
8 = grayscale, 24 = JPEG/sRGB, 32 = with alpha, 48 = 16-bit RAW
Max print size at this DPI
Pixels needed for a target print
What this tool does
A megapixel calculator for photographers, designers and anyone deciding whether an image is big enough to print or post. Type a width and height in pixels and read the megapixel count (MP equals width times height divided by one million), the simplified aspect ratio, the total pixel count, and the uncompressed bitmap size for a chosen bit depth. Switch the print resolution to 72, 150, 300 or 600 DPI to see the largest size the file can print at full quality, shown in both inches and centimetres. Work the other way as well: enter the print size you want and the tool returns the pixel dimensions, and the megapixels, you need to hit that DPI. Camera and video presets jump straight to 12, 24, 48 and 61 MP sensors plus 1080p, 4K and 8K frames. Everything runs locally as plain JavaScript, one click copies a clean summary, and the share link reopens with your exact numbers. No upload, no sign-in, no image ever leaves the page.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Designer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Megapixel Calculator fits into your work
Use it before upload, handoff, archive, support review, or any moment where a file needs one local check before it leaves your machine.
File jobs
- Checking file type, size, metadata, and obvious mismatch signals before sharing.
- Preparing mixed folders for upload, archive, intake, or review.
- Keeping sensitive files in the browser instead of sending them to an account-based service.
File checks
- Do not treat the extension alone as proof of the real file type.
- Review metadata before a file goes to customers, vendors, or a public page.
- Keep the original file until the copied, converted, or exported result is verified.
Good next steps
These links move the current task into a more complete workflow.
- 1 Aspect Ratio Calculator Calculate aspect ratio — fix any 1 of [width, height, ratio], get the other two. Open
- 2 Data Storage Converter Convert bytes, KB, MB, GB, TB and bits — decimal (1000) and binary (1024, KiB/MiB/GiB) side by side, with the hard-drive 931 GiB gotcha explained — browser-only Open
- 3 Unit Converter Convert between length, weight, temperature, area, volume, speed, time — instant, browser-only Open
Real-world use cases
Decide if a photo is big enough to print
A client asks for a 16 by 20 inch print and you are not sure your shot is large enough. Enter the file dimensions, set the DPI to 300, and read the max print size. If it falls short of 16 by 20, the reverse panel tells you that you would need 4800 by 6000 pixels (28.8 MP) to hit that size cleanly, so you know to reshoot, upscale, or quote a smaller print instead of guessing at the lab.
Size an image correctly before uploading
A marketplace wants product photos at least 1600 px on the long edge but under a file-size cap. Type your dimensions to confirm the pixel count clears the minimum, glance at the uncompressed size to sanity check how heavy the source is, and read the aspect ratio so you crop to the listing frame instead of letting their system letterbox it.
Plan storage and editing RAM for a shoot
Heading out with a 61 MP camera, you want to know how fat the files run. Punch in 9504 by 6336 at 48-bit and the uncompressed size lands near 344 MB per frame in memory. Multiply by your expected frame count and you know whether your card, laptop RAM and scratch disk can keep up before you are stuck deleting in the field.
Spec a poster or banner from a known print size
You know the final piece is a 24 by 36 inch poster and the printer wants 150 DPI for viewing distance. Enter 24 and 36 in the reverse panel, set DPI to 150, and the tool returns 3600 by 5400 pixels, about 19.4 MP. Now you can check whether the artwork or photo you have meets that target before sending it to print.
Common pitfalls
Confusing megapixels with file size. A 24 MP photo is always 24 MP, but its JPEG can be 6 MB or 12 MB depending on compression and content. Megapixels count pixels; the saved file size depends on the codec and quality setting. Use the uncompressed figure only for editing-memory planning, not download size.
Assuming more megapixels always means a sharper print. Print sharpness is megapixels and lens quality and print size together. A 12 MP file prints a tack-sharp 8 by 10 at 300 DPI, but stretch it to a 30-inch poster and it drops below 100 DPI and goes soft. Match the pixels to the actual print size, not the headline MP number.
Mixing up the long and short edge with the print orientation. If you enter width and height swapped, the max print size comes out rotated and the reverse pixel target is wrong for your layout. Check that the larger pixel dimension lines up with the longer side of the print you actually want.
Privacy
Every number here, the megapixel count, the aspect ratio, the uncompressed size and the print dimensions, is computed by plain JavaScript inside your browser tab. No image is ever loaded or uploaded, and nothing you type is logged or sent anywhere. The one thing to know: the shareable link encodes your width, height, DPI and bit depth in the query string, so a link pasted into chat records those numbers in the recipient server access log. They are just dimensions, not the photo itself, but skip the share link if even those are sensitive and use the copy button instead.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- ASCII Art Generator Generate ASCII art from text — figlet-style banners, multiple fonts.
- Avatar Generator Generate avatars from initials, identicons, or random shapes. Download PNG/SVG.
- Base64 Encoder & Decoder Encode or decode Base64 — text, files, and Data URLs. Runs entirely in your browser.
- Base64 Image Converter Image ⇄ Base64 — drag-drop PNG/JPG/WebP/SVG, get data URI for CSS / HTML / Markdown.