Email me

Free tool · runs in your browser · model data checked Oct 23, 2026

LLM VRAM calculator.

Know whether a model fits your GPU before you download 40 GB of weights. Pick a model, a quantization and a context length: you get the GB it needs, split into weights, KV cache and overhead, plus which of 12 GPU tiers can run it. The KV cache is computed from each model's real layer layout, not guessed from its size, and the formula is printed under the answer with your numbers in it.

Your setup

Pick a model, then change the numbers. Every field updates the answer.

Which GPUs fit

One card each. Memory per card from NVIDIA's spec pages.

GPUMemoryVerdict
NeedsDetails ↓

How the calculator works

GPU memory for running (not training) a model is three things added up:

Units. GB on this page means 1024³ bytes (GiB), the unit nvidia-smi and llama.cpp report. That is also why a "24 GB" card holds 24 of them.

Example. Llama 3.1 8B at Q4_K_M with an 8K context: weights 4.6 GB + KV cache 1.0 GB, plus 10% overhead = 6.1 GB. The weights figure matches the 4.58 GiB file llama.cpp lists for that quant. Push the same model to its full 128K context and the KV cache alone becomes 16.0 GB (total 22.6 GB).

Sources

FAQ

How much VRAM do I need to run an LLM?

Add weights, KV cache and overhead. Rough guide at 4-bit (Q4_K_M) with an 8K context: an 8B model needs about 6.1 GB, a 32B model about 22.7 GB and a 70B model about 47.0 GB. Pick your model above for the exact number.

Can I run an 8B model on an 8 GB GPU?

Yes at 4-bit: Llama 3.1 8B at Q4_K_M with an 8K context needs about 6.1 GB. In FP16 it needs about 17.6 GB, so you want a 24 GB card for full precision.

What is the KV cache and why does context length matter?

While generating, the model stores a key and a value vector for every past token in every attention layer so it does not recompute them. That store grows linearly with context length and batch size. At long context it can be bigger than the weights.

Does a smaller KV cache precision help?

Yes. llama.cpp and vLLM can store the KV cache in 8-bit (about half of FP16) or 4-bit, which lets you fit longer context on the same card. Quality impact depends on the model, so test it on your own prompts.

Do mixture-of-experts models need less VRAM?

They run faster per token because only a few experts are active, but every expert still has to be loaded. Qwen3 30B-A3B uses about 3B parameters per token and still needs memory for all 30.5B.

Why does Gemma 3 use so little KV cache at 128K context?

Five of every six Gemma 3 layers only look at the last 1,024 tokens. At 128K context, Gemma 3 27B needs about 10.4 GB of FP16 KV cache instead of the 62.0 GB it would need if every layer cached the full context.

Can I split a model across two GPUs?

Yes. llama.cpp, vLLM and others split layers or tensors across cards, so two 24 GB cards can hold a model that needs about 45 GB. Each card adds its own overhead, so leave some margin.

Is renting the API cheaper than buying the GPU?

Price the same workload on 24 hosted GPT, Claude and Gemini models, with prices from the official pricing pages. Then compare it with the card this page told you to buy.

Open the LLM API cost calculator →

Keep going

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ