Tecnología

JPEG File Size Calculator: Quality vs File Size

Estimate JPG file size from megapixels and quality (1–100). See the KB at Q60, Q75, Q85, Q90 and Q100 with a full compression table. Free, instant.

🗓️ Updated June 2026 Reviewed by
Calculator Free · Private
Reviewed by: (editorial policy ) · Last reviewed:
Have a website? Embed this calculator for free Free — copy the code and paste it on your website Embed on your site
<iframe src="https://hacecuentas.com/embed/jpg-quality-size-web-optimization" width="100%" height="560" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px" loading="lazy" title="JPEG File Size Calculator: Quality vs File Size"></iframe>
<p style="font-size:13px;text-align:center;margin:8px 0">Powered by <a href="https://hacecuentas.com" target="_blank" rel="noopener">Hacé Cuentas</a> — <a href="https://hacecuentas.com/jpg-quality-size-web-optimization" target="_blank" rel="noopener">JPEG File Size Calculator: Quality vs File Size</a></p>
Preview →

Paste it on your site. Keep the credit link — thanks for sharing. More widgets →

This JPEG File Size Calculator estimates how many KB (or MB) a JPG image will weigh based on its resolution in megapixels and the quality setting you choose (1–100). JPEG uses Discrete Cosine Transform (DCT) compression that discards high-frequency detail — the lower the quality, the more data is thrown away and the smaller the file. A 2 MP photo weighs roughly 390 KB at Q=85 but jumps to about 1.9 MB at Q=100, even though the difference is invisible on screen. Use it to hit a web-performance budget, fit photos on an SD card, or stay under an email attachment limit.

When to use this calculator

  • Choosing the JPEG quality before uploading product photos so each one lands under Google's recommended ~200 KB per hero image.
  • Estimating how many 12 MP vacation photos fit on a 32 GB SD card at Q=75 vs Q=90 before a trip.
  • Deciding whether to export a 24 MP DSLR portrait at Q=75 or Q=90 to stay under a 1 MB email attachment cap.
  • Sizing a news site's hero images to meet a Core Web Vitals LCP target under 2.5 s on 4G.

JPEG Compression Ratio & File Size by Quality Setting

Quality (Q)Compression RatioEstimated Size (2 MP)Estimated Size (12 MP)Visual LossTypical Use Case
Q = 100~3:1~1.91 MB~11.4 MBImperceptibleArchival, print pre-press
Q = 95~5:1~1.17 MB~7.0 MBImperceptiblePhotography masters
Q = 90~10:1~586 KB~3.4 MBNone to very slightHigh-quality web, portfolios
Q = 85~15:1~391 KB~2.29 MBNone on screenWeb sweet spot
Q = 75~22:1~266 KB~1.56 MBSlight on close-upGeneral web, blog images
Q = 60~35:1~167 KB~1.0 MBNoticeable artifactsThumbnails, social previews
Q = 40~50:1~117 KB~703 KBVisible blockingLow-bandwidth delivery
Q = 20~80:1~73 KB~439 KBSevere degradationPlaceholder / blur previews

Fuente: hacecuentas.com – JPEG File Size Calculator (model: MP × 3,000,000 ÷ compression ratio ÷ 1024). Sizes are estimates for typical photographic content; high-entropy scenes (dense foliage, textures) may exceed these values significantly.

How it works

How JPEG File Size Is Calculated

JPEG file size depends on three things: the pixel count, the color depth, and the quantization aggressiveness set by the quality slider. The practical estimate is:

Raw Bytes  = Megapixels × 1,000,000 × 3        (3 bytes/pixel, 8-bit RGB)
JPEG Bytes = Raw Bytes ÷ Compression_Ratio(Q)
KB         = JPEG Bytes ÷ 1024

The whole game is the compression ratio, and it changes dramatically with the quality setting.

Compression Ratio by Quality

Quality (Q)Compression RatioVisual LossTypical Use Case
100~3:1ImperceptibleArchival, print pre-press
95~5:1ImperceptiblePhotography masters
90~10:1None to very slightHigh-quality web, portfolios
85~15:1None on screenThe web sweet spot
75~22:1Slight on close-upGeneral web, blog images
60~35:1Noticeable artifactsThumbnails, social previews
40~50:1Visible blockingLow-bandwidth delivery
20~80:1Severe degradationPlaceholder / blur previews

> Why it matters: going from Q=100 to Q=85 multiplies the compression ratio 5× (3:1 → 15:1), so the file shrinks ~80% while the difference is invisible at screen resolution. That single change is the highest-leverage image optimization on the web.

---

JPEG Size Reference Table (by megapixels & quality)

Estimated file size for natural-photo content, matching the calculator's model:

MegapixelsResolution ExampleQ=100Q=90Q=85Q=75Q=60
0.3 MP640 × 480~293 KB~88 KB~59 KB~40 KB~25 KB
2 MP1920 × 1080 (FHD)~1.91 MB~586 KB~391 KB~266 KB~167 KB
8 MP3264 × 2448~7.6 MB~2.29 MB~1.53 MB~1.04 MB~668 KB
12 MP4000 × 3000~11.4 MB~3.4 MB~2.29 MB~1.56 MB~1.0 MB
24 MP6000 × 4000~22.9 MB~6.9 MB~4.58 MB~3.1 MB~2.0 MB
50 MP8688 × 5792~47.7 MB~14.3 MB~9.5 MB~6.5 MB~4.2 MB

These are estimates for typical photographic content. A 24 MP photo of a clear sky can compress to under 1 MB at Q=85, while the same 24 MP shot of dense foliage may exceed 6 MB — content entropy is the dominant variable.

---

Worked Cases

Case 1 — E-commerce product photo (2 MP, Q=85). Raw = 2,073,600 px × 3 ≈ 6 MB. At ~15:1: ≈ 390 KB output. Within most PageSpeed budgets for a hero image; convert to WebP to drop another 25–35%.

Case 2 — Smartphone photo for Instagram (12 MP, Q=75). 12 M × 3 ÷ 22 ÷ 1024 ÷ 1024 ≈ 1.56 MB. Instagram recompresses uploads to ~85–500 KB and caps the long edge at 1080 px, so pre-shrinking avoids a double-compression penalty.

Case 3 — Archival document scan (8 MP, Q=95). 8 M × 3 ÷ 5 ÷ 1024 ÷ 1024 ≈ 4.6 MB. For archival or OCR, Q=90–95 preserves fine text edges.

---

Common Mistakes

1. Using Q=100 for web. Q=100 produces files 5–8× larger than Q=85 with differences invisible at 96 PPI. The browser can't display the extra fidelity.
2. Mixing up quality scales. Photoshop's 0–12 scale ≠ libjpeg's 0–100. Photoshop "10" ≈ libjpeg Q=85; Photoshop "12" ≈ Q=97. Compare output bytes, not the slider number.
3. Ignoring content type. JPEG is bad at flat color, text, and line art — PNG or WebP can be 60–80% smaller for those. JPEG shines on continuous-tone photos.
4. Re-saving repeatedly. Every save below Q=100 re-applies lossy compression; artifacts and file size creep up 5–15% per cycle. Always edit from a lossless master (RAW/PNG).
5. Assuming size scales only with megapixels. Content entropy matters as much as resolution — a smooth scene at 24 MP can beat a textured scene at 12 MP.

---

Related Calculators

  • Aspect Ratio Calculator

  • Screen Resolution Calculator

  • Data Storage Unit Converter

  • Internet Speed & Download Time Calculator

  • Worked Example: 12 MP photo at Q=85

    Raw RGB data = 12 MP × 1,000,000 × 3 bytes = 36,000,000 bytes
    Compression ratio at Q=85 ≈ 15:1
    JPEG bytes = 36,000,000 ÷ 15 = 2,400,000 bytes
    KB = 2,400,000 ÷ 1024 = 2,344 KB ≈ 2.29 MB
    ≈ 2.29 MB (a typical 12 MP phone photo at high web quality)

    Frequently asked questions

    What JPEG quality should I use for website images?
    For most web use, Q=75–85 (on a 0–100 scale) is the sweet spot. Mozilla's SSIM studies and Google's WebP benchmarks both show that quality below 85 saves 30–50% in file size with no perceptible loss at typical screen resolution (96 PPI). Aim for under 200 KB for hero images and under 30 KB for thumbnails.
    How big is a 12 MP photo as a JPEG?
    At Q=85 (≈15:1 compression) a 12 MP photo is about 2.3 MB; at Q=75 about 1.6 MB; at Q=60 about 1.0 MB; and at Q=100 about 11 MB. The exact size varies with content — smooth scenes compress far better than detailed textures like foliage or hair.
    How does megapixel count affect JPEG file size?
    File size scales roughly linearly with pixel count at a fixed quality. Doubling resolution (2 MP → 4 MP) doubles the raw data and roughly doubles the compressed output. A 12 MP photo at Q=85 is about 6× larger than a 2 MP photo at the same quality, because 12 ÷ 2 = 6× the pixels.
    Why does Q=100 produce such a huge file?
    At Q=100 the quantization tables barely discard any DCT coefficients, so the compression ratio falls to about 3:1 — roughly 5× worse than Q=85's 15:1. That's why a 2 MP image jumps from ~390 KB at Q=85 to ~1.9 MB at Q=100, with no visible benefit on screen.
    Is JPEG compression lossy? Can I recover the original?
    Yes, JPEG is inherently lossy. Once compressed, the discarded DCT coefficients can't be reconstructed — any quality below 100 permanently removes data, and even Q=100 is minimally lossy. For lossless storage use PNG, TIFF, or WebP Lossless and keep a master copy.
    What is the difference between Q=85 in Photoshop and libjpeg?
    Photoshop uses a 0–12 quality scale mapped internally to quantization tables; libjpeg (most open-source tools) uses 0–100. Photoshop 'Quality 10' ≈ libjpeg Q=85, and Photoshop 'Quality 12' ≈ libjpeg Q=97. The numbers aren't interoperable — verify by output file size.
    Why is my JPEG sometimes larger after re-saving at the same quality?
    Re-saving decodes the JPEG to raw pixels and re-encodes it. Decoder rounding introduces tiny pixel changes the encoder treats as new high-frequency data, so files can grow 5–15% per re-save cycle even at identical settings, while artifacts accumulate. Always edit from a lossless master.
    Does JPEG quality affect color accuracy?
    Yes. JPEG works in YCbCr and usually applies 4:2:0 chroma subsampling (halving color resolution) below about Q=90, which can cause fringing on red text or saturated edges. At Q≥90 most encoders switch to 4:4:4 and keep full color. For critical color, use Q≥90 or PNG.
    How much smaller is WebP than JPEG at the same quality?
    Google's WebP studies show 25–34% smaller files than JPEG at equivalent SSIM. A 2 MP image that's 390 KB at JPEG Q=85 would be roughly 260–290 KB as WebP. All major browsers support WebP, and AVIF goes even smaller — usually worth the switch for the web.
    What quality do smartphones and social networks use?
    Most Android and iOS cameras shoot JPEG at Q=92–96. Instagram re-encodes uploads to about Q=85 and caps the long edge at 1080 px; Twitter/X compresses to about Q=85 up to 2048 px; Facebook uses Q=85 with progressive encoding. Pre-optimizing avoids double-compression loss.

    Methodology & trust

    Editorial

    Calculadora de tecnología revisada por el equipo editorial de Hacé Cuentas, contrastada con Wikipedia – JPEG (compression, quantization & quality), según nuestra política editorial y metodología.

    Updates

    Última revisión: June 20, 2026. Los parámetros se verifican periódicamente con las fuentes citadas.

    Privacy

    Calculations run 100% in your browser. We do not store or transmit your data.

    Limitations

    Indicative results. For critical decisions, consult a professional.

    📌 How to cite this calculator

    Rodríguez, M. (2026). JPEG File Size Calculator: Quality vs File Size. Hacé Cuentas. https://hacecuentas.com/jpg-quality-size-web-optimization

    Contenido bajo licencia CC-BY 4.0 — reutilizable citando la fuente con enlace a Hacé Cuentas.

    ✉️ Reportar un error en esta calculadora