Local LLM vs API cost calculator
Open models are available through APIs and can also run on your own hardware. Enter your usage and per-token prices to see the API cost, then weigh it against local hardware and electricity.
How to compare with local costs
Local costs are mostly upfront: a GPU or a machine with lots of RAM, plus electricity while generating. If the API estimate here is a large monthly number, a local setup may pay for itself within a year. If it is a few dollars, APIs are usually cheaper.
Hidden factors
- Privacy: local keeps every prompt on your machine.
- Model size: APIs can serve models too big for home hardware.
- Speed: data-centre GPUs are often faster.
- Availability: local models never change or disappear.
Common questions
Is running an LLM locally cheaper than an API?
For heavy daily use with hardware you already own, often yes. For light use, APIs are usually cheaper.
How much electricity does a local LLM use?
A GPU under load draws a few hundred watts; costs depend on hours of generation and local electricity prices.
Where do I find API prices?
On the provider's pricing page, listed per million input and output tokens.
Related
LLM VRAM Calculator
Estimate GPU memory for any LLM size, quantisation and context length, weights, KV cache and overhead.
Free toolAI Model Finder
Answer three questions, task, hardware, priority, and get suggested open-weight models to try.
Free toolLLM Token Counter
Estimate tokens, words and cost for any text and see how much of a model's context window it uses.
Free toolContext Length Calculator
See how many chat turns and words fit in a model's context window after the system prompt and reply reservation, from 4K to 1M tokens.
Free toolUncensored System Prompt Builder
Build a clear system prompt for uncensored, abliterated or fine-tuned local models, covering role, job, tone, format and your own boundaries.
Free toolImage Model VRAM Checker
Check whether open image models such as SDXL, FLUX, Chroma and Qwen-Image fit your GPU at BF16, FP8 or GGUF quantisation.
GuideRun an LLM on CPU Only: What Speed to Expect and How
Run local language models without a GPU: why memory bandwidth sets speed, model sizes that work, MoE models on CPU, threads, and llama.cpp settings.
Now pick a model.
Use the directory to find a model that matches your numbers.