GGUF Quantization Size Calculator
Estimate the on-disk size of any LLM in GGUF format — pick a parameter count and quant type (Q2_K to Q8_0, the IQ-quants, or F16) to see the file size, bits-per-weight, and which one fits your RAM or VRAM before you download. Formulas and measured sizes cited below.
How it works
GGUF is the model file format used by llama.cpp, Ollama, LM Studio, and koboldcpp. Every model ships in several quantizations — the same weights stored at different precision, from 16-bit floats down to under two bits each. Fewer bits means a smaller file and less memory, at some cost to quality. This calculator turns a parameter count and a quant type into an estimated file size so you can pick the smallest quant that still fits comfortably.
The estimate is a three-step calculation:
- Weight size. Each quant has a nominal bits-per-weight (bpw). File size ≈
parameters × bpw ÷ 8, reported in decimal GB (÷ 1e9) to match Hugging Face and Ollama download sizes. - Bits-per-weight. K-quant values come straight from the ggml block layout — Q4_K packs 256 weights into a 144-byte super-block, so 144 × 8 ÷ 256 = 4.5 bpw. Likewise Q6_K = 6.5625, Q5_K = 5.5, Q3_K = 3.4375, Q2_K = 2.625. I-quant values (IQ1–IQ4) come from the Hugging Face GGUF reference.
- Relative size.
size vs F16 = bpw ÷ 16 × 100%. A Q4_K_M model is about 28% of the F16 file; Q8_0 is about 53%.
Real GGUF files run roughly 5–15% away from the pure-weight estimate. Token-embedding and output tensors are usually kept at higher precision, and K-quant “mixes” (the _S / _M / _L suffixes) shift which layers use larger blocks. To keep the tool honest, each quant is shown next to llama.cpp's measuredLLaMA-7B (6.74B) file size from Discussion #2094:
| Quant | bpw | Estimate (7B) | Measured (7B) | Delta |
|---|---|---|---|---|
| Q2_K | 2.625 | 2.21 GB | 2.67 GB | -17.2% |
| Q3_K_S | 3.4375 | 2.90 GB | 2.75 GB | +5.3% |
| Q3_K_M | 3.4375 | 2.90 GB | 3.07 GB | -5.7% |
| Q3_K_L | 3.4375 | 2.90 GB | 3.35 GB | -13.5% |
| Q4_0 | 4.5 | 3.79 GB | 3.50 GB | +8.3% |
| Q4_K_S | 4.5 | 3.79 GB | 3.56 GB | +6.5% |
| Q4_K_M | 4.5 | 3.79 GB | 3.80 GB | -0.2% |
| Q4_1 | 5 | 4.21 GB | 3.90 GB | +8.0% |
| Q5_0 | 5.5 | 4.63 GB | 4.30 GB | +7.8% |
| Q5_K_S | 5.5 | 4.63 GB | 4.33 GB | +7.0% |
| Q5_K_M | 5.5 | 4.63 GB | 4.45 GB | +4.1% |
| Q5_1 | 6 | 5.05 GB | 4.70 GB | +7.6% |
| Q6_K | 6.5625 | 5.53 GB | 5.15 GB | +7.4% |
| Q8_0 | 8.5 | 7.16 GB | 6.70 GB | +6.9% |
| F16 | 16 | 13.48 GB | 13.00 GB | +3.7% |
The estimate and the measured size agree closely for the mid-range quants people actually use — Q4_K_M is within a fraction of a percent — and drift most at the extremes, where the fixed embedding/output overhead is a bigger share of a small model. For large models the two converge, because that overhead becomes a rounding error.
Worked examples
Frequently asked questions
Sources & references
- Hugging Face — GGUF quantization reference (bits-per-weight)
- huggingface.js — gguf quant-descriptions.ts (machine-maintained bpw table)
- llama.cpp Discussion #2094 — k-quants: measured 7B sizes + quality labels
- ggml — GGUF format specification (block structure)
Bits-per-weight constants and quality labels were last cross-checked against these sources on 2026-07-05. This tool estimates disk size only; for exact runtime VRAM use the linked LLM VRAM calculator.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.