Data & Web

Image File Size Calculator

From megapixels to megabytes — the uncompressed truth, the JPEG discount, and where RAW lands.

Image File Size Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

The frame
The JPEG
—
The uncompressed read—
The RAW read—
The image ledger—

What this result does not account for

  • 8-bit RGB lane for the uncompressed sum
  • The ratio is an average — content swings it either way
● Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: A 24-megapixel frame holds 72.000000 MB of 24-bit RGB — three bytes per pixel, no argument. JPEG compression at the common 1:10 lands the same frame near 7.200000 MB on the card; a 14-bit RAW with metadata sits near 30.000000, right in the 25–35 band camera manuals print. The three numbers are one frame wearing three formats, and the ratio — not the pixel count — is where the difference lives.

Formula

uncompressed MB = MP × 3 ··· JPEG = uncompressed ÷ ratio ··· RAW ≈ MP × 1.25

Every pixel of an 8-bit RGB image costs three bytes, so uncompressed size is megapixels times three and the sum is exact: 24 MP is 72.000000 MB of raw pixel data. JPEG spends that budget down by a content-dependent ratio — fine quality lands near 1:10, and the ratio moves with the picture: leaves resist, skies collapse. RAW is not RGB÷3: sensors record 12–14 bits per photosite with minimal compression, which lands near 1.25 MB per megapixel — the ballpark camera manuals confirm at 25–35 MB for a 24 MP body. Storage planning uses all three numbers; prints use the first.

Worked Example

  1. Read the sensor's megapixels.
  2. Set the JPEG ratio your camera shoots.
  3. Read all three formats for one frame.
  4. Multiply by the card, not the shot.

Defaults: 24 MP → 72.000000 uncompressed, 7.200000 as JPEG 1:10, RAW near 30.000000. Drive to 45 MP → 135.000000 / 13.500000 / 56.250000: the 45-megapixel body doubles the card bill and the JPEG discount barely grows.

Strengths & Limits Of This Model

Where this engine is strong

  • All three formats priced from one pixel count
  • Camera-manual ballparks cited beside the law

Where it stops

  • No per-image analysis — the ratio is the model

Risk & accuracy notice. Real JPEG sizes swing ±2× with content; RAW sizes vary by bit depth and compression option.

Practical Use Cases

Card shopping

shots per gigabyte, priced

Wedging workflows

RAW+JPEG pairs on one card

Archive estimates

a career of frames on a shelf

Methodology & Editorial Standards

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

Networking, storage and cloud cost modelling. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Image File Size Calculator — 8 Expert FAQs

8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

How do I calculate image file size?

Uncompressed: megapixels × 3 bytes of 24-bit RGB — 24 MP is 72.000000 MB. JPEG divides by the compression ratio, commonly near 10; RAW runs about 1.25 MB per megapixel because 14-bit photosites compress barely at all.

Why is my JPEG not exactly the calculated size?

The ratio is content-dependent: a leafless winter tree spends bits, a blank wall refunds them, and the same camera swings ±2× around the rung. Camera manuals print an average — Nikon's own 24 MP figure is about 12.7 MB at Large Fine — and this page's ratio chip is that average.

Why are RAW files bigger than JPEGs but smaller than RGB?

RAW records one luminance value per photosite (the color is demosaiced later) at 12–14 bits, so it runs about 1.75 bytes per pixel against JPEG's divided 3 and RGB's full 3. Bigger than the JPEG, smaller than the opened image — the negative, not the print.

What JPEG quality should I shoot?

Near the top: 90–95 costs about a third of maximum while looking identical, and below 70 artifacts arrive. On the card the difference between 1:8 and 1:15 is a few megabytes a frame; on a wedding it is a shelf.

How many photos fit on a card?

Divide the card by the per-frame size: a 64 GB card holds about 8,800 JPEGs at 7.200000 MB, or roughly 2,100 RAW files at 30.000000. The card arithmetic is the one place the format choice is worth hours of shooting.

Does megapixel count decide image quality?

It decides size, not quality — lens, sensor size and processing decide the picture. The pixel count prices the storage and the crop headroom; the pixels' goodness is a different argument.

Why does HEIC look half the size of JPEG?

A newer compression stage: HEIC lands near half of JPEG at like quality, which is why phones defaulted to it. The ratio chip can model any format — set 20 and the arithmetic prices a HEIC-shaped discount.

Should I shoot RAW+JPEG?

Priced, not preached: the pair costs about 37.200000 MB a frame at the defaults — the JPEG for speed, the RAW for the rescue. Cards are cheap; retakes of a moment are not.

Related Data & Web Engines