VRAM Calculator

Estimate the GPU VRAM a workload actually needs — a local LLM with its KV cache, or an image model from Stable Diffusion 1.5 up to Flux.2. Weight sizes are the released files, not estimates from parameter counts. The result is then matched against real cards from our comparison data.

Prices and specs last checked September 15, 2026.

Configure your workload

Image models size differently: there is no KV cache, and resolution drives the overhead instead of context length.

Parameter count. For MoE models, we use the total parameter count (VRAM must hold all weights).

Lower quantization = smaller VRAM footprint but quality tradeoff. Q4_K_M is the most common default.

KV cache grows linearly with context. Doubling context roughly doubles the cache size.

Q8 KV cache halves memory with minor quality impact. Supported in llama.cpp and newer Ollama.

CUDA context + framework overhead. Ollama and llama.cpp are leanest.

Total VRAM needed

16.4 GB

Model weights 4.5 GB
KV cache 2.0 GB
Runtime overhead 1.5 GB

Recommended VRAM tier

16GB card

A 16GB GPU will handle this workload with ~4GB headroom for longer context or batching.

GPUs that fit this workload

Common sizes at a glance

The calculator above works out any combination. These are the ones people ask about most, at the settings most people run — Q4_K_M weights, an FP16 cache, and 1.5GB of runtime overhead — so you can read the answer without touching a control. The cache column is what most guides get wrong: it is set by a model's key/value heads, not its size, which is why the 13B costs more context than the 70B.

ModelWeights Q4_K_MWeights Q8_0Weights FP16Cache at 4KCache at 32KTotal, Q4 + 4KTotal, Q4 + 32K
7B Mistral 7B v0.33.94 GB7.44 GB14 GB0.5 GB4 GB5.94 GB9.44 GB
8B Llama 3.1 8B4.5 GB8.5 GB16 GB0.5 GB4 GB6.5 GB10 GB
13B Llama 2 13B7.31 GB13.8 GB26 GB3.13 GB25 GB11.9 GB33.8 GB
14B Qwen 2.5 14B7.88 GB14.9 GB28 GB0.75 GB6 GB10.1 GB15.4 GB
27B Gemma 2 27B15.2 GB28.7 GB54 GB1.44 GB11.5 GB18.1 GB28.2 GB
32B Qwen 2.5 32B18 GB34 GB64 GB1 GB8 GB20.5 GB27.5 GB
34B Yi 1.5 34B19.1 GB36.1 GB68 GB0.94 GB7.5 GB21.6 GB28.1 GB
70B Llama 3.3 70B39.4 GB74.4 GB140 GB1.25 GB10 GB42.1 GB50.9 GB

How the math works

The total VRAM needed for running an LLM is the sum of three components: model weights, KV cache, and runtime overhead. Each scales differently based on your configuration.

1. Model weights

Weight memory scales with parameter count and quantization bits per parameter. For a 7B model at Q4_K_M (~4.5 bits/param), the weights occupy roughly 4 GB. At FP16 the same model takes ~14 GB. See our how much VRAM for AI guide for a full breakdown by workload type.

weights_GB = (params_in_billions × bits_per_param) / 8

2. KV cache

Every token in your context window adds to the KV cache. What sets its size is not the model's hidden width but how many key/value heads it keeps: almost every model since 2024 uses grouped-query attention, sharing one set of keys and values across several query heads. Llama 3 70B carries 8 KV heads of 128 dimensions against 64 query heads, so its cache is about 0.31 MB per token at FP16 — roughly 10 GB at 32K context, not the 80 GB you would get by assuming every query head kept its own. The older multi-head models are the expensive ones: Llama 2 13B keeps 40 KV heads and costs 0.78 MB per token, more than twice a model five times its size.

kv_GB = 2 × num_layers × (kv_heads × head_dim) × context × precision_bytes / 1024³

3. Runtime overhead

CUDA context, framework buffers, activation memory during inference. Ollama and llama.cpp are leanest (~1-1.5 GB). vLLM with heavy batching can consume 2-3 GB more. Text Generation WebUI with extensions loaded is heaviest.

Why "recommended" differs from "fits"

A workload that needs 15.8 GB will technically fit in a 16GB card, but there's no headroom. Any extra context, a second user, or a driver update can push it over and cause OOM errors. We recommend the next VRAM tier up when headroom is under 2 GB. This is why we usually point readers toward the RTX 4090 for AI or a used RTX 3090 once workloads push past 16 GB.

This calculator gives representative estimates based on typical Transformer architectures. Actual VRAM usage varies by model family (Llama, Mistral, Qwen have slightly different layer counts and hidden sizes), driver, framework, and batch size. Treat results as ±10% accurate. See our methodology for how we derive these numbers.