Lelifi·tools

Image File Size Calculator

A 4000 x 3000 image is 12 megapixels and 36 MB uncompressed at 24-bit colour. Saved as a JPEG at 10:1 it is about 3.6 MB, which is 90% smaller, and it prints at 13.3 x 10.0 inches at 300 DPI. A 64 GB card holds roughly 16,700 of them.

Enter the pixel dimensions, colour depth and how the file is saved to see its size in megabytes, the print size at 300 DPI, and how many images fit on a memory card.

By the Lelifi editors ·

Key takeaways

A 12 MP photo (4000 x 3000, 24-bit) in four formats36.0 MB18.0 MBUncompressed 36.0 MB (36.0 MB)PNG 18.0 MB (18.0 MB)JPEG 10:1 3.6 MB (3.6 MB)WebP 15:1 2.4 MB (2.4 MB)
Same 12 million pixels, four formats: 36 MB uncompressed down to 2.4 MB as WebP.
From pixels to megabytes4000 x 3000 pixels = 12,000,000 pixels24 bits per pixel = 3 bytes per pixel12,000,000 x 3 = 36,000,000 bytes= 36.0 MB uncompressedat 10:1 JPEG compression = 3.6 MB= 13.3 x 10.0 inches at 300 DPIDivide MB by 1.0486 to get MiB, which is what a file manager usually shows.
Pixels times bytes per pixel, then the compression ratio, then the print size.
On this page
  1. The formula: pixels x bits per pixel
  2. Worked example: a 12 MP photo in four formats
  3. What compression does
  4. Print size, DPI and megapixels
  5. How many photos fit on a card or in the cloud
  6. Web images: why the on-screen size is not the file size

The formula: pixels x bits per pixel

An image file is a grid of pixels, and each pixel stores one or more numbers. Multiply the number of pixels by the number of bytes each pixel needs and you have the raw size of the image before compression.

Colour depth is the part people get wrong. A standard RGB photo is 24-bit: 8 bits for red, 8 for green and 8 for blue, which is 3 bytes per pixel. Add an alpha channel for transparency and it becomes RGBA at 32-bit, or 4 bytes per pixel. A grayscale image is 8-bit, or 1 byte per pixel, which is why black-and-white scans are a third the size of colour ones at the same dimensions.

Two unit traps follow. File managers report binary megabytes (MiB) while storage is sold in decimal megabytes (MB), so a 36 MB file shows as 34.3 MiB. And camera megapixels are rounded: a "24 MP" sensor is usually 6000 x 4000, but a "12 MP" phone camera may be 4032 x 3024, which is 12.2 MP and therefore slightly larger than this page's example.

Worked example: a 12 MP photo in four formats

Take a 4000 x 3000 image, which is 12,000,000 pixels, in 24-bit RGB.

How it is savedRatioFile sizeNotes
Uncompressed TIFF or RAW1:136.0 MBEvery pixel stored exactly
16-bit TIFF1:172.0 MB48 bits per pixel
PNG (lossless)about 2:118.0 MBExact pixels, smaller file
JPEG, quality 85about 5:17.2 MBPrint quality
JPEG, quality 80about 10:13.6 MBWeb and email
JPEG, quality 60about 20:11.8 MBVisible softness
WebP, quality 80about 15:12.4 MBSmallest useful for the web

Uncompressed is 36 MB, and a normal web export is 3.6 MB, a factor of ten, from the same 12 million pixels. The pixels never changed; only the number of bits used to describe them did. That is the whole point of compression, and it is also why "how big is this image" has no single answer without naming the format.

The PNG row is worth a second look. PNG is lossless, so the file contains exactly the same pixels as the uncompressed original, yet it is half the size. It achieves that by describing patterns rather than repeating them, which works well on graphics and screenshots and much less well on photographs, where noise and texture defeat the pattern finder.

What compression does

JPEG is lossy: it throws information away on purpose, mostly in fine detail and subtle colour variation that the eye is bad at noticing. The compression ratio is the lever, and it is not linear in quality. Going from quality 95 to quality 80 might halve the file with no visible change, while going from 80 to 60 saves another half again and starts to show softness and blocky artefacts around edges.

The ratio also depends on the picture. A smooth studio portrait with a blurred background can compress 20:1 and look perfect. A night shot at high ISO, full of sensor noise, might only manage 4:1 because noise is the hardest thing for a JPEG encoder to describe. This is why two 12 MP photos can be 1.8 MB and 6 MB with the same camera settings.

Practical guidance for most people: keep the camera's highest quality setting for anything you might print, export at quality 80 for the web, and never re-save a JPEG repeatedly. Every save re-compresses an already-compressed image and the artefacts compound, so edit from the original file every time. The W3C's PNG specification and the ISO standard behind JPEG both describe the formats in full if you want the technical detail.

DPI is not stored in the pixels; it is a note in the file header telling a printer how densely to place them. Change the DPI tag and the file size does not move at all, only the printed dimensions do.

Print sizePixels needed at 300 DPIMegapixels
4 x 6 inches1,200 x 1,8002.2 MP
5 x 7 inches1,500 x 2,1003.2 MP
8 x 10 inches2,400 x 3,0007.2 MP
11 x 14 inches3,300 x 4,20013.9 MP
16 x 20 inches4,800 x 6,00028.8 MP

Run the example backwards. A 4000 x 3000 image is 13.3 x 10.0 inches at 300 DPI, 20 x 15 inches at 200 DPI, and 26.7 x 20 inches at 150 DPI. For a print viewed from a normal distance, 300 DPI is the safe target; for a poster on a wall, 150 DPI is usually acceptable because you step back to look at it.

This is where the megapixel question lives. A 12 MP file covers every print size up to about 11 x 14 at 300 DPI. Beyond that, you are either accepting a lower DPI, paying for an upscaling service, or shooting with a higher-resolution camera. For screens, none of it matters: a 4K monitor is 8.3 MP, so almost any modern camera out-resolves the display.

How many photos fit on a card or in the cloud

Divide the card's capacity by the file size. A 64 GB card is 64,000 MB in decimal units, and storage overhead eats a few percent, so plan on roughly 60,000 MB of usable space.

Cloud storage works the same way, which is why a 200 GB photo library is not unusual for a family that shoots a few hundred frames a month in RAW. It is also why web images matter: a page with twenty 3.6 MB images costs 72 MB of transfer, which is a slow, expensive page. Twenty images at 200 KB costs 4 MB, loads in a second on a decent connection and looks identical on screen.

If you are choosing between shooting RAW and JPEG, the file-size difference is roughly 3x, and that is the whole trade: RAW keeps the data you need to recover a badly exposed shot, and JPEG keeps the storage free. Most photographers shoot RAW plus a small JPEG and delete the duplicates later. Check what your card reports after formatting rather than trusting the label, and keep a second card in the bag.

Web images: why the on-screen size is not the file size

An image on a web page is displayed at some CSS size in pixels, and it is delivered at whatever pixel dimensions the file has. Those are two different numbers, and the gap between them is where page weight comes from.

Three fixes cover most of it. Match the file to the display size. A 4000-pixel-wide photo shown in a 1200-pixel column is carrying three times the pixels it can show. Export at 2x the display width for high-density screens and no more. Choose the format for the content. Photographs belong in JPEG or WebP; logos, screenshots and anything with flat colour and hard edges belong in PNG or SVG, where they are both smaller and sharper. Compress deliberately. Quality 80 with a modern encoder is visually indistinguishable from quality 95 for photographs and roughly half the size.

Do the arithmetic before you upload. A 2000 x 1125 hero image is 6.75 MB uncompressed, about 200 KB as a quality-80 JPEG and about 140 KB as WebP. On a page with twenty images, that difference is 4 MB against 2.8 MB, and on a mobile connection it is the difference between a page that feels instant and one that does not. Everything on this page is a calculation, not a measurement: the only way to know a specific file's real size is to export it and look.

Frequently asked questions

How big is a 4000 x 3000 image uncompressed?

36 MB. 4000 x 3000 is 12,000,000 pixels, and at 24-bit colour that is 3 bytes per pixel, so 36,000,000 bytes. A file manager will call it 34.3 MiB, because it divides by 1,048,576 instead of 1,000,000.

How big is a 12 megapixel JPEG?

About 3.6 MB at a typical 10:1 compression ratio, and anywhere from 2 MB to 6 MB depending on how much detail and noise the photo contains. A busy landscape compresses worse than a smooth portrait.

How many photos fit on a 64 GB card?

About 6,700 to 7,100 at 9 MB each, which is what a 24 megapixel camera produces at 8:1 JPEG compression. The lower figure allows for the few percent of card capacity that formatting consumes. The same card holds roughly 890 uncompressed 72 MB files, or around 2,600 files at 24 MB if you shoot RAW.

What is the file size of a 24 megapixel RAW file?

72 MB uncompressed at 24-bit, or 144 MB at 16 bits per channel. Most camera RAW formats compress losslessly, so expect 25 to 45 MB in practice for a 6000 x 4000 sensor.

How many megapixels do I need for an 8x10 print at 300 DPI?

7.2 megapixels: 8 inches x 300 DPI = 2,400 pixels wide, and 10 x 300 = 3,000 pixels tall, so 2,400 x 3,000 = 7,200,000 pixels. A 12 MP image prints an 8x10 at 300 DPI with room to spare.

How large can I print a 4000 x 3000 photo?

13.3 x 10.0 inches at 300 DPI, 20 x 15 inches at 200 DPI, or 26.7 x 20 inches at 150 DPI. Print quality drops as the DPI falls, and 150 DPI is about the floor for a print you will look at closely.

Why is my exported image bigger than the original?

Usually because the export changed the format or the colour depth. Saving a JPEG as a 16-bit PNG, or adding an alpha channel, can multiply the size by 2 or 4 even though the pixels never changed. Check bits per pixel before blaming the software.

How big is a 2000 x 1125 web image?

6.75 MB uncompressed at 24-bit, which is far too large for the web. Exported as a JPEG at quality 80 it is usually around 200 KB, and as WebP about 140 KB, a 97% reduction for the same visible result.

Does DPI change the file size?

No. DPI is only a printing instruction stored as metadata. A 3000 x 2000 image is 18 MB uncompressed whether it is tagged 72 DPI or 300 DPI. What changes is the printed size: 10 x 6.7 inches at 300 DPI, or 41.7 x 27.8 inches at 72 DPI.

How much smaller is WebP than JPEG?

Typically 25% to 35% smaller at the same visual quality. A 200 KB JPEG becomes roughly 140 KB as WebP, which on a page with 20 images saves about 1.2 MB of transfer per visit.

What does an alpha channel add to file size?

One byte per pixel. RGB is 24-bit, or 3 bytes per pixel; adding transparency makes it RGBA at 32-bit, or 4 bytes per pixel, which is a 33% increase before compression. On a 12 MP image that is 36 MB becoming 48 MB.

Why is a 1 GB card not exactly 1,000 MB of photos?

Two reasons. Storage is sold in decimal units, so 1 GB is 1,000,000,000 bytes, but file managers display binary units, where 1 GiB is 1,073,741,824 bytes. Cards also carry formatting overhead, so plan on about 90% to 95% of the nominal capacity being usable.

Spotted a wrong number or a broken result?

More Design tools

See all Design tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.