OpenAI Token Calculator

The OpenAI Token Calculator estimates token volume and API spend for text-based workloads. It separates input, cached input, and output usage so teams can model a single request, a daily workload, or a full billing period without treating every token as equally priced.

It is useful when comparing prompt designs, setting usage budgets, or forecasting the effect of higher response lengths. Enter the token counts and the per-million-token rates from the model and processing tier you plan to use. The result shows estimated cost per request, total period cost, and the share attributable to each token type.

Calculation inputs

requests
tokens
tokens
tokens
USD
USD
USD
Result
Estimated result
Cost per request
Total tokens
Input-side cost
Output cost
  1. Set the workload

    Enter requests in period and any other volume assumptions that define the period or batch.

  2. Add usage assumptions

    Complete the remaining usage fields, keeping token, duration, or size units consistent with their labels.

  3. Enter current rates

    Use the current prices for the exact model, endpoint, quality, and processing tier you plan to use.

  4. Review the estimate

    Read the main result and the supporting breakdown to see the largest cost or capacity driver.

  5. Test another scenario

    Change one assumption at a time or select Reset to restore the default example values.

Total cost = Requests × [(Uncached input tokens × Input rate + Cached tokens × Cached rate + Output tokens × Output rate) ÷ 1,000,000]

The calculator applies the entered values directly and displays rounded results for planning.

What the result means

The main result is the estimated API charge for the entered request volume and token rates.

Actual billed usage may differ because tokenization, cache eligibility, tools, and processing tiers can change measured usage.

Given: Given 10,000 requests, 1,200 input tokens, 200 cached tokens, 400 output tokens, and rates of $2.50, $0.25, and $15 per million tokens

Calculation: Given 10,000 requests, 1,200 input tokens, 200 cached tokens, 400 output tokens, and rates of $2.50, $0.25, and $15 per million tokens: uncached input cost per request is 1,000 × 2.50 ÷ 1,000,000 = $0.0025; cached input is $0.00005; output is $0.006. Total is $0.00855 per request, or $85.50 for the period.

Result: The displayed result follows the same formula and rounding logic.

Should cached tokens also be included in total input tokens?

Yes. Enter total input tokens in the input field and the cached portion separately; the calculator prices the overlapping cached portion at the cached rate.

Where do I find token prices?

Use the current pricing page or model documentation for the exact model and processing tier you intend to call.

Does this include tool-call fees?

No. Add separate tool, storage, image, audio, or other usage charges outside this text-token estimate.

Can I use this for one request?

Yes. Set requests in period to 1 to see the cost of a single call.

Why can the invoice differ from this estimate?

The service bills measured tokens and eligible cache usage. Prompt formatting, hidden system content, retries, and model routing can change totals.