LLM Cost Calculator

Processed locally

Compare OpenAI, Anthropic, Gemini, and DeepSeek API costs from tokens or pasted text. Free, no signup.List prices checked on 2026-12-02

Workload

Cost comparison

Cheapest in this scenario: GPT-6 Luna at $4.00 total ($0.000400 / request)
ModelProviderIn / 1MOut / 1MInput $Output $Total/ req
GPT-6 LunaOpenAI$0.1000$0.5000$1.50$2.50$4.00$0.000400
Claude Haiku 5.5Anthropic$0.1000$0.5000$1.50$2.50$4.00$0.000400
GPT-4o mini
Previous generation
OpenAI$0.1500$0.6000$2.25$3.00$5.25$0.000525
GPT-5.4 nano
Previous generation
OpenAI$0.2000$1.25$3.00$6.25$9.25$0.000925
DeepSeek V4.1 Flash
Peak rate. Off-peak hours cost half.
DeepSeek$0.3000$1.20$4.50$6.00$10.50$0.001050
Gemini 3.1 Flash-Lite
Instant Tools uses this model. Google shuts it down on 2027-05-07.
Google$0.2500$1.50$3.75$7.50$11.25$0.001125
Gemini 3.5 Flash-LiteGoogle$0.3000$2.50$4.50$12.50$17.00$0.001700
Gemini 3 Flash Preview
Previous generation
Google$0.5000$3.00$7.50$15.00$22.50$0.002250
Gemini 3.8 Flash
Price through 2026-12-31. From 2027-01-01: $1.50 in, $7.50 out.
Google$0.7500$3.75$11.25$18.75$30.00$0.003000
GPT-5.4 mini
Previous generation
OpenAI$0.7500$4.50$11.25$22.50$33.75$0.003375
DeepSeek V4 Pro
Peak rate. Off-peak hours cost half.
DeepSeek$1.32$3.96$19.80$19.80$39.60$0.003960
GPT-6.1 TerraOpenAI$1.00$5.00$15.00$25.00$40.00$0.004000
Claude Haiku 4.5
Previous generation
Anthropic$1.00$5.00$15.00$25.00$40.00$0.004000
Gemini 4 HydrogenGoogle$1.50$7.50$22.50$37.50$60.00$0.006000
GPT-6.2 SolOpenAI$2.00$10.00$30.00$50.00$80.00$0.008000
Claude Sonnet 5.5Anthropic$2.00$10.00$30.00$50.00$80.00$0.008000
GPT-4o
Previous generation
OpenAI$2.50$10.00$37.50$50.00$87.50$0.008750
Gemini 3.1 Pro PreviewGoogle$2.00$12.00$30.00$60.00$90.00$0.009000
GPT-5.4
Previous generation
OpenAI$2.50$15.00$37.50$75.00$112.50$0.0112
Claude Sonnet 4.6
Previous generation
Anthropic$3.00$15.00$45.00$75.00$120.00$0.0120
Gemini 4 NeonGoogle$3.00$15.00$45.00$75.00$120.00$0.0120
Claude Opus 5.5Anthropic$4.00$20.00$60.00$100.00$160.00$0.0160
Gemini 4 CarbonGoogle$4.00$20.00$60.00$100.00$160.00$0.0160
Gemini 4 ArgonGoogle$4.00$20.00$60.00$100.00$160.00$0.0160
Claude Opus 4.8
Previous generation
Anthropic$5.00$25.00$75.00$125.00$200.00$0.0200
GPT-5.5
Previous generation
OpenAI$5.00$30.00$75.00$150.00$225.00$0.0225
GPT-6.2 AstraOpenAI$8.00$40.00$120.00$200.00$320.00$0.0320
Claude Fable 5.2Anthropic$8.00$40.00$120.00$200.00$320.00$0.0320

Each provider name links to the pricing page its rates come from. Cache writes and storage fees are not included.

How to Use

  1. 1Pick tokens or paste a typical prompt to estimate input size.
  2. 2Set expected completion size and how many requests you run per month.
  3. 3Toggle providers, cache hit rate, and batch if your workload qualifies.
  4. 4Sort is automatic (cheapest first). Spot the best price/performance tier.

Example scenarios

Support chatbot

1,500 in · 400 out · 50,000 req/mo

Often won by Luna / Haiku / mini tiers.

Code agent

8,000 in · 2,000 out · 5,000 req/mo

Mid tiers (Claude Sonnet / GPT-6.2 Sol / Gemini Flash) trade cost for quality.

Tips

  • •Output tokens usually dominate cost. Constrain response length when you can.
  • •Prompt caching only helps when a large stable prefix is reused.
  • •Batch APIs suit offline jobs. They do not fit interactive chat.
  • •Re-check provider pricing pages before locking a budget. List rates move.

Frequently Asked Questions

How accurate is this LLM cost calculator?

It multiplies your token counts by published list prices (USD per 1M tokens), including the higher rates some models charge for very long prompts. Real bills also depend on cache write and storage fees, flex or off-peak tiers, image tokens, and promotions. Treat results as planning estimates and verify on the official pricing pages.

How do you estimate tokens from text?

We use a rough English heuristic of ~4 characters per token on this page. For exact OpenAI tiktoken counts (and multi-provider estimates), use the Token Counter tool.

What does cache hit rate mean?

If your provider supports prompt caching, repeated prompt prefixes can bill at a lower cached-input rate. The slider blends standard vs cached input rates for the estimated input portion.

What is the batch discount?

OpenAI, Anthropic, and Google list about 50% off for asynchronous Batch APIs. Enabling Batch halves input and output cost for their models. DeepSeek's pricing page lists no batch discount, so its cost stays the same.

Does my prompt leave the browser?

No. Token estimates and cost math run entirely client-side.

Is the calculator free?

It is free. No signup and no API calls are needed to compare models.