---
title: "AI API Cost Calculator: Price Any LLM Call by Model"
description: "Free AI cost calculator: set input and output tokens, pick from 36 LLM models, and see the real per-call, monthly and annual API bill."
url: "https://wpwebhooks.org/tools/llm-cost-calculator/"
date: "2026-07-29"
---

[WP Webhooks](https://wpwebhooks.org/)/ [Tools](https://wpwebhooks.org/tools/)/ AI cost calculator

/Tools

# AI Cost Calculator for LLM API Calls

Set the token size of a real request, pick a model, and see what it actually costs — per call, per month, per year.

Rates verified 29 July 2026 / 36 models / 6 providers

cost = (input\_tokens × input\_rate + output\_tokens × output\_rate) ÷ 1,000,000

Model

Input tokens 4,700

$0.00705 — the prompt, system message and tool schemas you send.

Output tokens 390

$0.00293 — billed at 5.0× the input rate on this model. Reasoning tokens count here.

Cached input n/a

Google does not publish a flat cache-hit rate for this model.

Calls per month 10,000

Input cost

$0.00705

Output cost

$0.00293

Per-call cost

$0.00997

Output is 7.7% of the tokens but 29% of the cost.

Per month

$99.75

Per year

$1,197

If you resell this as credits

weighted = 4,700 + 5.0 × 390 = 6,650

→ 7 credits at 1,000 weighted tokens each

One credit backs $0.00142 of spend on this model, for any input/output mix.

Cheapest for this call is gpt-5-nano at $0.00039 — 25.5× less than your pick. Over a year that is $1,150 of difference.

## The same call, every model

4,700 input and 390 output tokens priced against all 36 models. Cheapest to most expensive — a 540× spread for identical work.

| # | Model | Provider | Per call | Per year | vs cheapest |
| --- | --- | --- | --- | --- | --- |
| 1 | gpt-5-nano | OpenAI | $0.00039 | $46.92 | — |
| 2 | GLM-4.7-FlashX | Z.ai | $0.00049 | $58.20 | 1.2× |
| 3 | deepseek-v4-flash | DeepSeek | $0.00077 | $92.06 | 2.0× |
| 4 | GLM-4.5-Air | Z.ai | $0.00137 | $164.28 | 3.5× |
| 5 | gpt-5.4-nano | OpenAI | $0.00143 | $171.30 | 3.7× |
| 6 | Gemini 3.1 Flash-Lite | Google | $0.00176 | $211.20 | 4.5× |
| 7 | gpt-5-mini | OpenAI | $0.00196 | $234.60 | 5.0× |
| 8 | deepseek-v4-pro | DeepSeek | $0.00238 | $286.06 | 6.1× |
| 9 | Gemini 3.5 Flash-Lite | Google | $0.00238 | $286.20 | 6.1× |
| 10 | GLM-4.7 | Z.ai | $0.00368 | $441.36 | 9.4× |
| 11 | gpt-5.4-mini | OpenAI | $0.00528 | $633.60 | 13.5× |
| 12 | GLM-5 | Z.ai | $0.00595 | $713.76 | 15.2× |
| 13 | Claude Haiku 4.5 | Anthropic | $0.00665 | $798.00 | 17.0× |
| 14 | gpt-5.6-luna | OpenAI | $0.00704 | $844.80 | 18.0× |
| 15 | GLM-5-Turbo | Z.ai | $0.0072 | $864.00 | 18.4× |
| 16 | GLM-5.2 | Z.ai | $0.0083 | $995.52 | 21.2× |
| 17 | gpt-5 | OpenAI | $0.00977 | $1,173 | 25.0× |
| 18 | gpt-5.1 | OpenAI | $0.00977 | $1,173 | 25.0× |
| 19 | Gemini 3.6 Flash | Google | $0.00997 | $1,197 | 25.5× |
| 20 | Gemini 3.5 Flash | Google | $0.0106 | $1,267 | 27.0× |
| 21 | Claude Sonnet 5 (intro) | Anthropic | $0.0133 | $1,596 | 34.0× |
| 22 | gpt-5.2 | OpenAI | $0.0137 | $1,642 | 35.0× |
| 23 | Gemini 3.1 Pro | Google | $0.0141 | $1,690 | 36.0× |
| 24 | gpt-5.4 | OpenAI | $0.0176 | $2,112 | 45.0× |
| 25 | gpt-5.6-terra | OpenAI | $0.0176 | $2,112 | 45.0× |
| 26 | Claude Sonnet 5 (standard) | Anthropic | $0.0199 | $2,394 | 51.0× |
| 27 | Kimi K3 | Moonshot | $0.0199 | $2,394 | 51.0× |
| 28 | Claude Opus 5 | Anthropic | $0.0333 | $3,990 | 85.0× |
| 29 | gpt-5.5premium | OpenAI | $0.0352 | $4,224 | 90.0× |
| 30 | gpt-5.6-solpremium | OpenAI | $0.0352 | $4,224 | 90.0× |
| 31 | Claude Fable 5premium | Anthropic | $0.0665 | $7,980 | 170.1× |
| 32 | Claude Mythos 5premium | Anthropic | $0.0665 | $7,980 | 170.1× |
| 33 | gpt-5-propremium | OpenAI | $0.1173 | $14,076 | 300.0× |
| 34 | gpt-5.2-propremium | OpenAI | $0.1642 | $19,706 | 420.0× |
| 35 | gpt-5.4-propremium | OpenAI | $0.2112 | $25,344 | 540.2× |
| 36 | gpt-5.5-propremium | OpenAI | $0.2112 | $25,344 | 540.2× |

**How to read this.** Rates are per million tokens, taken from each provider's own documentation on 2026-07-29. Published pricing changes often — check the source before you budget against it.

-   The default 4,700 / 390 split is a planning or tool-calling request: a large prompt, a short structured answer. Chat workloads invert it, which changes the ranking.
-   Cached input is only applied to models whose provider publishes a flat cache-hit rate. The rest ignore the slider rather than guess.
-   Batch APIs on OpenAI, Google and Anthropic discount both directions by 50% — halve any figure here if the work is not interactive.

The reasoning behind the credit formula, the output-weight ratios, and where each rate came from is written up in [what an AI feature actually costs per call](https://wpwebhooks.org/blog/llm-api-pricing-cost-per-call/).

/FAQ

## Questions about AI pricing.

Rates come from each provider's own documentation — the full write-up is in the LLM cost article.

How do you calculate the cost of an LLM API call? +

Multiply input tokens by the model input rate, output tokens by the output rate, and divide by 1,000,000. On Gemini 3.6 Flash ($1.50 in / $7.50 out) a 4,700-input, 390-output call is (4,700 × 1.50 + 390 × 7.50) ÷ 1,000,000 = $0.00998. Every provider bills in exactly that shape, so the only hard part is knowing your real token size.

Why does the calculator default to 4,700 input and 390 output tokens? +

That is a measured production request for a planning or tool-calling task: a large system prompt plus tool schemas going in, a short structured decision coming back. It is deliberately not a chat workload, which inverts the ratio and changes which model is cheapest. Move the sliders to match your own traffic — and expect real calls to run 1.5 to 2 times larger than a thin test sample.

Why are output tokens more expensive than input tokens? +

Generating tokens is sequential, while input can be processed in parallel, and providers price accordingly. The ratio is typically 5× on Anthropic, Google Flash and Kimi K3, 6–8× across the OpenAI GPT-5 line, and 2× on DeepSeek V4. Because reasoning tokens are billed as output, a model that always thinks can cost more than its visible answer suggests.

Why is the cached-input slider disabled for some models? +

Because that provider does not publish a flat per-token cache-hit rate. OpenAI, Anthropic, Moonshot and DeepSeek do, so the slider applies their real discount — typically 0.1× the base input rate, and as low as 0.02× on DeepSeek. For Google and Z.ai models the slider is disabled rather than guessing a number that would make the result wrong.

Which LLM API is the cheapest? +

At the default call size, gpt-5-nano ($0.05 / $0.40 per million) and GLM-4.7-FlashX ($0.07 / $0.40) are the cheapest paid options, with DeepSeek V4 Flash ($0.14 / $0.28) close behind. Cheapest only matters if quality holds for your task, so A/B a candidate on real requests before switching. Note that model naming is not a price guide: Kimi K3 costs the same per call as Claude Sonnet 5 at standard pricing.

How should I charge credits if I resell AI usage? +

Charge from the token counts the provider returns, not a flat price per request, because a flat rate always undercharges your largest calls. Weight output tokens by the model output-to-input price ratio, divide by a fixed tokens-per-credit constant, and settle after the call succeeds. One credit then backs a fixed amount of provider cost for any input/output mix.

How current are these prices? +

Every rate was read from the provider's own documentation on 29 July 2026 — never from aggregator sites, which drift. Published pricing changes often, and introductory rates expire: Claude Sonnet 5 moves from $2/$10 to $3/$15 on 1 September 2026. Verify against the provider before you budget against any figure here.

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"WebApplication","name":"AI API Cost Calculator","url":"https://wpwebhooks.org/tools/llm-cost-calculator/","applicationCategory":"DeveloperApplication","operatingSystem":"Any","browserRequirements":"Requires JavaScript","inLanguage":"en","description":"Free AI cost calculator: set input and output tokens, pick from 36 LLM models, and see the real per-call, monthly and annual API bill.","datePublished":"2026-07-29","dateModified":"2026-07-29","isAccessibleForFree":true,"offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"featureList":["Per-call cost for 36 models across 6 providers","Adjustable input and output token counts","Cached-input pricing where the provider publishes a cache-hit rate","Monthly and annual projections from call volume","Token-linked credit charge for reselling AI usage"],"publisher":{"@type":"Organization","name":"WP Webhooks","url":"https://wpwebhooks.org"}}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"WP Webhooks","item":"https://wpwebhooks.org/"},{"@type":"ListItem","position":2,"name":"Tools","item":"https://wpwebhooks.org/tools/"},{"@type":"ListItem","position":3,"name":"AI API Cost Calculator","item":"https://wpwebhooks.org/tools/llm-cost-calculator/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How do you calculate the cost of an LLM API call?","acceptedAnswer":{"@type":"Answer","text":"Multiply input tokens by the model input rate, output tokens by the output rate, and divide by 1,000,000. On Gemini 3.6 Flash ($1.50 in / $7.50 out) a 4,700-input, 390-output call is (4,700 × 1.50 + 390 × 7.50) ÷ 1,000,000 = $0.00998. Every provider bills in exactly that shape, so the only hard part is knowing your real token size."}},{"@type":"Question","name":"Why does the calculator default to 4,700 input and 390 output tokens?","acceptedAnswer":{"@type":"Answer","text":"That is a measured production request for a planning or tool-calling task: a large system prompt plus tool schemas going in, a short structured decision coming back. It is deliberately not a chat workload, which inverts the ratio and changes which model is cheapest. Move the sliders to match your own traffic — and expect real calls to run 1.5 to 2 times larger than a thin test sample."}},{"@type":"Question","name":"Why are output tokens more expensive than input tokens?","acceptedAnswer":{"@type":"Answer","text":"Generating tokens is sequential, while input can be processed in parallel, and providers price accordingly. The ratio is typically 5× on Anthropic, Google Flash and Kimi K3, 6–8× across the OpenAI GPT-5 line, and 2× on DeepSeek V4. Because reasoning tokens are billed as output, a model that always thinks can cost more than its visible answer suggests."}},{"@type":"Question","name":"Why is the cached-input slider disabled for some models?","acceptedAnswer":{"@type":"Answer","text":"Because that provider does not publish a flat per-token cache-hit rate. OpenAI, Anthropic, Moonshot and DeepSeek do, so the slider applies their real discount — typically 0.1× the base input rate, and as low as 0.02× on DeepSeek. For Google and Z.ai models the slider is disabled rather than guessing a number that would make the result wrong."}},{"@type":"Question","name":"Which LLM API is the cheapest?","acceptedAnswer":{"@type":"Answer","text":"At the default call size, gpt-5-nano ($0.05 / $0.40 per million) and GLM-4.7-FlashX ($0.07 / $0.40) are the cheapest paid options, with DeepSeek V4 Flash ($0.14 / $0.28) close behind. Cheapest only matters if quality holds for your task, so A/B a candidate on real requests before switching. Note that model naming is not a price guide: Kimi K3 costs the same per call as Claude Sonnet 5 at standard pricing."}},{"@type":"Question","name":"How should I charge credits if I resell AI usage?","acceptedAnswer":{"@type":"Answer","text":"Charge from the token counts the provider returns, not a flat price per request, because a flat rate always undercharges your largest calls. Weight output tokens by the model output-to-input price ratio, divide by a fixed tokens-per-credit constant, and settle after the call succeeds. One credit then backs a fixed amount of provider cost for any input/output mix."}},{"@type":"Question","name":"How current are these prices?","acceptedAnswer":{"@type":"Answer","text":"Every rate was read from the provider's own documentation on 29 July 2026 — never from aggregator sites, which drift. Published pricing changes often, and introductory rates expire: Claude Sonnet 5 moves from $2/$10 to $3/$15 on 1 September 2026. Verify against the provider before you budget against any figure here."}}]}
```
