Back to Developer Tools

AI API cost planning

LLM API Cost Calculator

Estimate LLM API costs with editable input, output, and cached-token rates.

Planning inputs

About LLM API Cost Calculator: Editable Token Pricing

Estimate request, monthly, and annual LLM API costs using editable input, output, and cached-input rates.

Change the example inputs to match a scenario and review the methodology and limitations before using the result in a decision. Calculations run locally in your browser.

How the calculation works

Input cost

Uncached input tokens ÷ 1,000,000 × input rate, plus cached input tokens ÷ 1,000,000 × cached rate.

Total cost

Input cost + output tokens ÷ 1,000,000 × output rate.

How to use this tool

  1. 1Replace the example values with internally consistent inputs.
  2. 2Review all result cards and any not-applicable state.
  3. 3Compare multiple scenarios and verify important assumptions independently.

Understanding the result

Use rates from the provider and model you actually plan to use.

Cost per request is an average across the entered workload.

Important limitations

  • Outputs are planning estimates and do not include every provider, accounting, financing, tax, legal, or operational factor.
  • Invalid divisions are shown as not applicable rather than NaN or Infinity.
  • Rates change and are intentionally editable; no hard-coded provider preset is claimed as current.

Explore this topic

Frequently asked questions

What does the LLM API Cost Calculator: Editable Token Pricing calculate?

Estimate request, monthly, and annual LLM API costs using editable input, output, and cached-input rates.

Are the results guaranteed?

No. Results are deterministic estimates from the values and assumptions you enter.

How should I use the result?

Use it for planning and scenario comparison, then verify current rates, costs, accounting definitions, and professional requirements that apply to your situation.

Is entered data uploaded?

No. The calculation runs in your browser.

Use with

These tools support a practical next or previous step in the same workflow.

Related tools

Selected from curated relationships first, then the same subtopic and category.