💵 LLM API Cost Calculator

Enter your token volume once and see every model ranked from cheapest to priciest — GPT-4o, GPT-4.1, o1, Claude, Gemini, DeepSeek, and Mistral, side by side.

📊 Usage Details
Prompt + system message + context sent with each call.
Expected length of the model's response.
📈 Cost Ranking
Cheapest Model (Monthly)
Your Selection (Monthly)
Cheapest Cost/Request
Your Cost/Request
Priciest Model (Monthly)

🏆 Ranked: Cheapest to Priciest (monthly)

Monthly Cost by Model
Your Selection: Input vs Output
⚠️ Prices updated June 2026 — verify current rates on each provider's pricing page before budgeting. Ranking reflects standard real-time API pricing; OpenAI and Anthropic batch APIs can cut these numbers by roughly 50% for asynchronous workloads. All providers bill in USD.
📊

Enter your details and click Calculate to see results

Guide

About the LLM API Cost Calculator

Last updated: August 2026 · Reviewed by the NeftCal editorial team

The LLM API cost calculator exists because picking a model by memory alone stopped being realistic once OpenAI, Anthropic, Google, DeepSeek, and Mistral were each shipping several priced tiers at once. Instead of estimating one model's bill in isolation, this tool takes a single input/output token profile and request volume and instantly ranks all 14 models — GPT-4o, GPT-4.1, o1, o3-mini, Claude Sonnet 4.6, Claude Opus 4.8, Gemini 1.5 Pro/Flash, DeepSeek V3/R1, Mistral Large, and more — from cheapest to priciest, so you see exactly where your chosen model sits relative to every real alternative.

What This Calculator Estimates

Every LLM provider bills per token, but the input price and output price are set independently, and the ratio between them differs by provider and even by model generation. This calculator turns your average input tokens, output tokens, and daily request count into a per-request dollar figure and a projected monthly cost for all 14 supported models simultaneously, then sorts the list so the cheapest and priciest options — and your own pick — are immediately visible side by side.

Who Should Use This Calculator

It's built for developers choosing a model for a new AI feature, engineering leads weighing a provider switch to cut spend, product managers scoping a vendor comparison for a roadmap review, and startup founders projecting API burn rate before committing to an architecture. It's equally useful for anyone auditing an existing integration after a provider changes its published rates.

Why Per-Request Cost Comparison Matters

Headline "per 1M tokens" pricing is misleading on its own, because a model with cheap input tokens can still be one of the pricier options once your typical response length grows — output tokens are billed at 3-5x the input rate on nearly every provider in this list. Comparing all 14 models at your actual token mix, rather than eyeballing separate pricing pages, avoids the common mistake of picking a "cheap" model that turns out expensive for an output-heavy workload.

Real-World Applications

  • Choosing a provider for a brand-new AI feature before writing production code
  • Evaluating whether switching from a current model to a cheaper alternative is worth the migration effort
  • Comparing GPT-4o, Claude Sonnet 4.6, and Gemini 1.5 Pro at the same token volume for a specific workload
  • Sizing the cost side of a chatbot or copilot feature alongside NeftCal's AI Token Calculator for a fuller budget picture
  • Backing up a vendor recommendation to a manager or client with a concrete, ranked price comparison

Tips for Accurate Results

  • Pull real input and output token averages from your provider's usage dashboard or API response metadata rather than guessing
  • Re-run the comparison whenever you change a prompt template or add retrieval context, since both shift your input token count
  • Remember this shows standard real-time pricing — OpenAI and Anthropic batch APIs can cut the numbers roughly in half for async workloads
  • Weigh output quality alongside price; a cheaper model that needs retries or a longer prompt can quietly erase its savings
  • Revisit this comparison at least quarterly, since per-token pricing across providers has changed multiple times a year historically
Formula

The Formula, Explained

How this LLM API cost calculator turns a token profile into a ranked cost comparison

Cost Per Request Formula
Cost/Request = (Input Tokens ÷ 1,000,000 × Input Price) + (Output Tokens ÷ 1,000,000 × Output Price)

Monthly Cost Formula
Monthly Cost = Cost/Request × Requests per Day × 30

Ranking Rule
All 14 models are computed with the same Input Tokens, Output Tokens, and Requests per Day, then sorted ascending by Monthly Cost.

Input Price and Output Price are each model's published dollars-per-million-token rate, shown directly in the model dropdown. The calculator applies the identical formula to all 14 models at once — only the two price constants change per model — which is what makes the ranking an apples-to-apples comparison.

🔢

Input vs Output Tokens

Input tokens cover your prompt, system message, and any retrieved context sent with each call. Output tokens are the model's generated response — priced separately, and almost always at a higher per-token rate than input.

🏆

Cheapest, Priciest & Your Pick

The results highlight the single cheapest model by monthly cost, the priciest, and whichever model you selected as "Your Selection" — so you can read off the exact dollar gap between your current choice and every alternative.

📊

Monthly Roll-Up

Cost per request is multiplied by requests per day, then by 30, to approximate a 30-day month. This is a projection, not a calendar-exact billing cycle, so actual invoices may differ slightly by a day or two of usage.

⚙️ Why This Formula Works

Per-token billing is linear — doubling your token count doubles the cost of that component — so multiplying token counts by published per-million-token rates and summing the input and output components gives an exact cost per request under standard, non-batched pricing. Applying that same formula uniformly across all 14 models is what lets the ranking be a fair, apples-to-apples comparison rather than a set of mismatched estimates.

🎯 When to Use It

  • Comparing multiple LLM providers before choosing one for a new feature
  • Deciding whether a provider switch is worth pursuing at your real token volume
  • Sanity-checking a current integration's cost against every viable alternative

📋 Assumptions

  • Input and output token counts per request are roughly constant averages you supply
  • Request volume is roughly steady across the month (no seasonal spikes modeled)
  • Pricing reflects each provider's standard, non-negotiated public rate, not a custom contract

⚠️ Limitations of the Formula

  • Doesn't model the OpenAI/Anthropic batch API discount (roughly 50% off for async workloads)
  • Doesn't account for prompt caching, which can cut repeated-prefix input costs substantially
  • Doesn't include provider volume discounts, committed-use pricing, or enterprise contracts
  • Ranks purely on price — says nothing about a model's reasoning quality, context window, or reliability
Walkthrough

Step-by-Step: How to Use

From entering your token profile to reading the full 14-model ranking

Enter input tokens per request

Type the average input tokens per call — your prompt, system message, and any retrieved context combined. The default is 1,000 tokens.

Enter output tokens per request

Type the expected length of the model's response in tokens. The default is 500 tokens — output tokens are usually the pricier half of the bill.

Set requests per day

Enter your expected daily call volume, so a single request's cost can be rolled up into a projected monthly figure for every model.

Choose your model

Pick the model you're using or considering from the Your Selection dropdown. It doesn't change the ranking — it just highlights that row as "your pick."

Click "Compare Costs"

The calculator computes cost per request and monthly cost for all 14 models at your exact numbers and sorts them cheapest to priciest.

Read the ranked list and charts

Review the cheapest and your-selection cost boxes, the full ranked list with badges, and the bar chart (monthly cost by model) and doughnut chart (your selection's input vs output split).

Example

Worked Example

Using the calculator's own default scenario — 1,000 input / 500 output tokens, 1,000 requests/day, Claude Sonnet 4.6 selected

Scenario

Suppose you're comparing providers for a feature that sends 1,000 input tokens and expects 500 output tokens per request, at 1,000 requests per day, with Claude Sonnet 4.6 ($3.00 / $15.00 per 1M input/output tokens) as your current pick.

Input Tokens1,000
Output Tokens500
Requests/Day1,000
Step 1 — Input cost per request (Claude Sonnet 4.6): (1,000 ÷ 1,000,000) × $3.00 = $0.003.
Step 2 — Output cost per request: (500 ÷ 1,000,000) × $15.00 = $0.0075.
Step 3 — Total cost per request: $0.003 + $0.0075 = $0.0105.
Step 4 — Monthly cost: $0.0105 × 1,000 requests/day × 30 = $315.00/month.
Step 5 — Cheapest alternative at the same volume: Gemini 1.5 Flash computes to (1,000 ÷ 1,000,000) × $0.075 + (500 ÷ 1,000,000) × $0.30 = $0.000225/request → shown as "<$0.01" → $0.000225 × 1,000 × 30 = $6.75/month.
Step 6 — Priciest alternative: o1 computes to (1,000 ÷ 1,000,000) × $15.00 + (500 ÷ 1,000,000) × $60.00 = $0.045/request → $0.045 × 1,000 × 30 = $1,350.00/month — a roughly 200× spread from cheapest to priciest at this exact volume.
Your Selection (Claude Sonnet 4.6)
$315.00/mo
Cheapest (Gemini 1.5 Flash)
$6.75/mo
Priciest (o1)
$1,350.00/mo

Explanation: At this exact volume, Claude Sonnet 4.6 lands 11th out of 14 by price — output tokens (500 × $15.00/1M = $0.0075) make up roughly 71% of its per-request cost even though it's outnumbered two-to-one by input tokens, because its output rate is 5× its input rate. Switching to Gemini 1.5 Flash would cut the monthly bill from $315.00 to $6.75, a 97.9% reduction — but that comparison alone doesn't confirm Flash produces comparable output quality for the task at hand, which is why price ranking should be a shortlist step, not the final decision.

Interpretation

Understanding Your Result

What your selected model's projected monthly cost generally implies

Your Selection's Monthly CostWhat It Generally MeansRecommended Next Step
Under $25Ultra-low-cost tier — likely a mini/flash-class modelProceed as-is; the price gap to switch further is usually not worth the effort
$25 – $150Budget-friendly production tierGood default for most features; re-check ranking only if volume grows sharply
$150 – $400Mid-tier flagship pricingCompare against the top 2-3 cheaper models in the ranking before committing at scale
$400 – $1,000Premium model tierJustify the premium with a documented quality difference, or test a cheaper alternative
Over $1,000Frontier/top-tier pricingRigorously validate that no cheaper model in the ranking can do the job before scaling

If your selection is far from the cheapest row: that gap is the real, quantified cost of choosing capability over price. Use it to decide whether the quality difference is worth paying for, rather than assuming the priciest model is automatically the best fit.

If the ranking shifts a lot when you change output tokens: that's expected — output pricing varies more between providers than input pricing does, so an output-heavy workload (long-form writing, detailed summaries) tends to separate cheap and expensive models further than a short-answer workload does.

These are planning-stage estimates based on published standard pricing, not exact invoices. Always reconcile against your provider's live billing dashboard once a feature is in production.

ℹ️

This calculator provides planning estimates only. Actual charges depend on your provider's live pricing, any negotiated or promotional rates on your account, and provider-side rounding. Always verify against your provider's billing dashboard before finalizing a budget.

Use Cases

Practical Use Cases

Where ranking per-request LLM cost across providers genuinely helps

🚀

Choosing a provider for a new feature

Rank all 14 models before writing production code, so the first line of code targets a model you've already price-checked.

🔁

Evaluating a provider switch

Quantify the exact monthly savings (or cost increase) of moving from your current model to an alternative before committing engineering time to a migration.

⚖️

Comparing GPT vs Claude vs Gemini

Run the same token profile across OpenAI, Anthropic, and Google's flagship models to see which wins on price for your specific workload.

📢

Justifying a premium model to stakeholders

Show a manager or client the concrete dollar gap between a frontier model like o1 and a mid-tier alternative to support a build vs. cost tradeoff discussion.

📈

Benchmarking cost before scaling

Check how the ranking holds up as you project requests-per-day growth from a pilot to full production traffic.

🪙

Mini/flash vs flagship decisions

See exactly how much a lightweight model like GPT-4o mini or Gemini 1.5 Flash saves versus its flagship sibling at your real volume.

✍️

Estimating the cost of longer outputs

Test how a verbose response style versus a terse, structured one shifts your ranking, since output tokens are priced highest across every provider here.

🛒

Enterprise vendor procurement

Bring a ranked, apples-to-apples price comparison into a vendor evaluation instead of relying on each provider's own pricing page in isolation.

🧭

Cost-based model routing design

Identify which cheap model can handle simple requests and which premium model should be reserved for complex ones in a multi-model routing architecture.

🧾

Startup burn-rate and investor projections

Fold a specific, ranked LLM API cost figure into a pitch deck or burn-rate model instead of an unverified round number.

🎓

Academic and research budget planning

Estimate the API spend for a research project or coursework assignment that calls multiple LLMs before requesting a grant or lab budget.

🔍

Auditing cost after a pricing change

Re-run the comparison whenever a provider updates its published rates to confirm your current model is still the right price/quality tradeoff.

Pros & Cons

Benefits and Limitations

What this LLM API cost calculator does well, and where it can't replace live billing data

✅ Benefits

  • Free, instant, and requires no signup or account
  • Runs entirely in your browser — your token counts are never uploaded to a server
  • Ranks 14 models across five major providers in one view, not one at a time
  • Highlights the cheapest model, the priciest model, and your own pick simultaneously
  • Applies one uniform formula to every model, keeping the comparison apples-to-apples
  • Recomputes instantly whenever you change your token or volume inputs
  • Visual bar chart of monthly cost by model and a doughnut chart of input vs output split
  • Rolls a single request's cost up into a realistic monthly projection
  • Downloadable plain-text summary of your comparison
  • Fast-loading and mobile-friendly, with no account wall blocking the calculator
  • Useful as a repeatable check whenever provider pricing changes
  • Makes the input/output price asymmetry across providers visible at a glance

⚠️ Limitations

  • Doesn't model the OpenAI/Anthropic batch API discount (roughly 50% off for async workloads)
  • Doesn't account for prompt caching, which can cut repeated-prefix costs substantially
  • Doesn't include provider volume discounts or negotiated enterprise contracts
  • Assumes roughly constant input/output token counts and steady daily request volume
  • Ranks purely on price — doesn't measure reasoning quality, latency, or reliability
  • Doesn't factor in each model's context window size, which may rule out some options
  • Pricing snapshots can lag a provider's most recent rate change
  • Not a substitute for your provider's live usage and billing dashboard
Reference

GPT, Claude & Gemini Pricing Comparison

All 14 supported models, ranked cheapest to priciest at the calculator's default volume: 1,000 input / 500 output tokens per request, 1,000 requests/day

RankModelInput / Output ($ per 1M)Cost / RequestMonthly Cost
1Gemini 1.5 Flash$0.075 / $0.30<$0.01$6.75
2GPT-4o mini$0.15 / $0.60<$0.01$13.50
3DeepSeek V3$0.27 / $1.10<$0.01$24.60
4DeepSeek R1$0.55 / $2.19<$0.01$49.35
5o3-mini$1.10 / $4.40<$0.01$99.00
6Claude Haiku 4.5$1.00 / $5.00<$0.01$105.00
7Mistral Large$2.00 / $6.00<$0.01$150.00
8GPT-4.1$2.00 / $8.00<$0.01$180.00
9GPT-4o$2.50 / $10.00<$0.01$225.00
10Gemini 1.5 Pro$3.50 / $10.50<$0.01$262.50
11Claude Sonnet 4.6$3.00 / $15.00$0.0105$315.00
12Claude Opus 4.8$5.00 / $25.00$0.0175$525.00
13Claude Fable 5$10.00 / $50.00$0.0350$1,050.00
14o1$15.00 / $60.00$0.0450$1,350.00

Common Mistakes and Expert Tips

❌ Common Mistakes

  • Comparing headline per-1M-token prices without running your actual input/output token mix through them
  • Ignoring output tokens, which are billed at 3-5x the input rate on nearly every provider here
  • Assuming this calculator includes the OpenAI/Anthropic batch discount, when it shows standard real-time pricing only
  • Switching to the cheapest-ranked model without first validating its output quality on your actual task
  • Treating a one-time comparison as permanent instead of re-checking after a provider pricing update
  • Ignoring context window differences that might disqualify an otherwise cheap model for a long-document use case

💡 Expert Tips & Best Practices

  • Pair this ranking with the AI Token Calculator to estimate token counts directly from real prompt text first
  • Use the Prompt Cost Estimator for an itemized system/user/output cost breakdown on your chosen model
  • Re-run the comparison after any prompt template change, since even small input length shifts can move the ranking
  • Check the Context Window Calculator before assuming a cheap-ranked model's context is large enough for your use case
  • If your workload can tolerate 24-hour async turnaround, manually halve the OpenAI/Anthropic rows to approximate batch pricing
📝

Summary: This LLM API cost calculator gives you an instant, free ranking of per-request and monthly cost across 14 models from OpenAI, Anthropic, Google, DeepSeek, and Mistral, so you can see the real dollar gap between providers at your exact token volume instead of comparing pricing pages by eye. Pair it with the AI Token Calculator and Fine-tuning Cost Estimator for a fuller AI cost picture.

FAQ

Frequently Asked Questions

Common questions about comparing LLM API pricing

Which LLM API is cheapest in 2026?
Among mainstream providers, Gemini 1.5 Flash ($0.075/$0.30 per 1M input/output tokens) and GPT-4o mini ($0.15/$0.60 per 1M) are typically the cheapest general-purpose options, followed by DeepSeek V3. The exact ranking depends on your input-to-output token ratio, since output tokens are billed at a much higher rate across every provider.
Why does the ranking change based on my token counts?
Every model has a different ratio between its input price and output price. A model that looks cheap on input tokens can still end up expensive overall if your output tokens per request are large, because output tokens are billed at 3-5x the input rate on most providers. This calculator recomputes the ranking every time you change your input, output, or volume numbers.
Does this include OpenAI's or Anthropic's batch API discount?
No — this calculator shows standard, real-time API pricing. Batch APIs from OpenAI and Anthropic can cut costs by roughly 50% for asynchronous, non-urgent workloads; if that fits your use case, apply a 0.5x multiplier to the numbers shown here for those providers.
How is monthly cost calculated?
Cost per request is (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price). That figure is multiplied by your requests per day, then by 30 to estimate a monthly cost. Actual invoices may differ slightly due to provider-side rounding, minimum billing units, and any volume discounts you negotiate.
Should I always pick the cheapest model?
Not necessarily. Cheaper models often have smaller context windows or weaker reasoning on complex tasks, which can increase retries, hallucination-driven rework, or the need for a larger prompt to get the same quality — all of which add hidden cost. Use this calculator to see the price gap, then validate output quality before switching a production workload to a cheaper model.
How many models does this LLM API cost calculator compare?
14 models across five providers: OpenAI (GPT-4o, GPT-4.1, GPT-4o mini, o1, o3-mini), Anthropic (Claude Fable 5, Claude Opus 4.8, Claude Sonnet 4.6, Claude Haiku 4.5), Google (Gemini 1.5 Pro, Gemini 1.5 Flash), DeepSeek (V3, R1), and Mistral Large. Every model is ranked simultaneously at the same token volume and request rate you enter.
What's the difference between this calculator and the AI Token Calculator?
This LLM API cost calculator takes a fixed input/output token count and ranks all 14 supported models from cheapest to priciest at that volume — its focus is per-request price comparison. The AI Token Calculator instead estimates token counts directly from pasted prompt text, adds multilingual and batch-discount modeling, and is built for budgeting one specific model rather than comparing many at once.
Why is Claude Sonnet 4.6 selected by default?
Claude Sonnet 4.6 is a commonly deployed mid-tier flagship model, so it makes a representative default starting point for comparison. It has no effect on the ranking itself — the dropdown only controls which row gets the "your pick" badge highlighted in the results. Change it to any of the 14 models to see where your actual choice lands.
How do I find accurate input and output token averages for my app?
Check your API provider's usage dashboard or response logs, which typically report exact prompt_tokens and completion_tokens per call. If you haven't shipped yet, run a handful of representative test calls through your chosen model and average the token counts, or estimate with a tool like the AI Token Calculator before you have real traffic to measure.
Does a model's context window affect this cost ranking?
No — this calculator ranks models purely on per-token input and output price at your stated volume, not on context window size. A large context window (like Gemini 1.5 Pro's 2M tokens) matters for whether a long document or conversation fits at all, but it doesn't change the dollar cost of the tokens you actually send. Check context window separately if long inputs are a concern.
Why do some models show "<$0.01" per request instead of an exact figure?
The calculator's display formatting rounds any per-request cost below one cent to "<$0.01" rather than showing a long decimal like $0.000225, since fractions of a cent aren't meaningful for an individual request. The full-precision figure is still used internally to compute the monthly cost roll-up, which is shown to the cent or with more decimal places for sub-dollar totals.
How much can changing my output length shift the ranking?
Substantially, because output tokens are priced 3-5x higher than input tokens on nearly every provider in this calculator. Doubling your average output length can noticeably close or widen the gap between models with very different output prices — for example, it disproportionately raises the cost of o1 or Claude Fable 5 relative to Gemini 1.5 Flash. Always re-run the comparison after changing your expected response length.
Is this a good way to justify switching LLM providers to a manager or client?
It's a strong starting point — the ranked list and monthly cost figures make the price gap concrete and easy to present. But pair it with a quality validation step before recommending a switch: run your actual prompts against the candidate model and confirm output quality holds up, since a cheaper model that needs retries or a longer prompt can erase the savings shown here.
Does the calculator account for rate limits, latency, or uptime?
No — this LLM API cost calculator focuses only on per-token dollar cost. Rate limits, response latency, and provider uptime vary independently of price and can matter just as much for production reliability. Check the separate Inference Latency Calculator and each provider's status page alongside this cost comparison before committing to a model.
How often should I re-run this comparison?
Re-run it whenever a provider announces new pricing, whenever you ship a prompt change that meaningfully alters your input or output token counts, and at least quarterly as a routine check, since LLM API pricing has shifted multiple times a year across every major provider historically.
What's the typical price gap between the cheapest and most expensive model here?
At the calculator's default volume (1,000 input / 500 output tokens per request, 1,000 requests/day), the gap between Gemini 1.5 Flash (about $6.75/month) and o1 (about $1,350/month) is roughly 200x. The exact multiple shifts with your token mix, since each model's input-to-output price ratio is different, but frontier reasoning models are consistently far pricier than lightweight/mini models at the same volume.
Does fine-tuning a model change the per-token price shown here?
Yes — this calculator shows base, off-the-shelf API pricing for each model, not fine-tuned pricing. Providers that offer fine-tuning typically charge a higher per-token rate for a custom fine-tuned model than for the corresponding base model, plus a separate one-time or per-hour training fee. Use the Fine-tuning Cost Estimator to model that training and inference price delta separately.
Learn More

Authoritative Resources

Official documentation to complement this calculator — always verify live rates before finalizing a budget

Related Calculators

Explore other AI & tech tools