WealthPulse.
Calculator · Business & Tech

AI API Cost Calculator

Token spend per request, per user and at scale, including cache savings.

Read the how-to
42,180
The formula

How this number is built

cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000
Step by step

Doing it by hand

Step 1

Measure real token counts from a sample of production requests.

Step 2

Separate input from output — they are priced very differently.

Step 3

Apply prompt caching to the stable portion of your context.

Step 4

Divide by requests and by active users to get the two unit numbers that matter.

Step 5

Model a traffic multiple so a growth spike does not surprise the budget.

Questions

What people ask next

How do I reduce cost fastest?

Shorten outputs, cache the static prompt prefix, and route simple requests to a smaller model.

Are tokens the same as words?

No. English text averages roughly three-quarters of a word per token, and code is denser than prose.

Search intent

Searches this page answers

Related searchGoes to
openai python sdkHow to Calculate AI API Cost
openai gpt-4.1 pricingHow to Calculate AI API Cost
openai codex githubHow to Calculate AI API Cost
openreviewHow to Calculate AI API Cost
Keep going

Tools that follow from this one

Estimates, not advice. Every figure here is produced from the inputs you enter and the formula printed on the page. Rules differ by state, carrier, lender and contract, so use these numbers to prepare for a conversation with a qualified professional rather than to replace one. See our full disclaimer.