Home › Blog › LLM API Cost Calculator

LLM API Cost Calculator

By Victor, founder of apicuts

Enter your traffic, your average token counts and your model's prices. The calculator shows what each request costs and what your monthly bill will be.

Cost per request-
Per day-
Per month-
Per year-
A 20% cut saves per month-

Example prices. Replace them with your model's current rates from your provider's pricing page. A month is 30 days.

Quick answer

Cost per request = (uncached input tokens × input price + cached input tokens × cached price + output tokens × output price) ÷ 1,000,000. Multiply by requests per day for your daily spend.

The formula

cost per request = ( uncached input tokens × input price + cached input tokens × cached input price + output tokens × output price ) ÷ 1,000,000

Prices are quoted per million tokens, which is why the total is divided by 1,000,000.

Where to find your numbers

How to bring the number down

Raise the cached share by keeping the start of your prompts identical, move background work to batch APIs, and send simple routes to smaller models. The guides for OpenAI and Anthropic walk through each step.

Want us to find your 20%?

Book a free 15-minute API cost teardown. Bring last month's provider usage and we'll show you your biggest waste and the first fix we'd ship.

Get My Free 15-Minute API Cost Teardown

Frequently asked questions

How accurate is this calculator?

As accurate as the numbers you enter. Use average token counts from your own logs and the current prices for your model.

How do I include batch discounts?

The batch APIs at OpenAI and Anthropic charge half the standard rate, so halve both prices for routes that run in batch.

Why does output cost more than input?

Providers price output tokens higher than input tokens, often several times higher, so long replies and reasoning add up fast.

Related