Free tool · runs in your browser

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.

Includes chat history re-sent each turn.
$0pay-as-you-go / month
$0per message
0tokens / month
0msgs/day to match sub
Pay-as-you-go vs subscription
Usage-based
Subscription

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.

Now pick a model.

Use the directory to find a model that matches your numbers.