Tech calculator

API Cost

Estimate request cost from input/output tokens and prices per million tokens.

What is the API Cost?

Estimate request cost from input/output tokens and prices per million tokens.

This Calcwise tool is built around the question a user is actually trying to answer. The main result explains the outcome in plain language, while the supporting figures show how the answer was produced.

How to use this calculator

  1. Replace every example value with your own numbers.
  2. Read the What this means guide directly under each input.
  3. Check the main answer and the supporting breakdown.
  4. Enable Pro mode to compare an alternate requests scenario without losing your main inputs.

Inputs used

  • Input tokens per request — Tokens sent to the API. Example: 2000
  • Output tokens per request — Tokens generated by the API. Example: 800
  • Input price per 1M tokens — Current provider input price. Example: 2
  • Output price per 1M tokens — Current provider output price. Example: 8
  • Number of requests — How many similar requests you expect. Example: 10000

API Cost formula

Total cost = requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000.

The formula is shown so the result is not a black box. Where the result is an estimate, the assumptions are stated explicitly.

Worked example

The calculator opens with a usable example: Input tokens per request = 2000, Output tokens per request = 800, Input price per 1M tokens = 2. The live answer above shows what those sample inputs mean. Replace them with your own values to get your result.

Important assumptions and limitations

Estimate only. Use your own values and check important decisions against the relevant provider, contract or official rule.

Results should be treated as a planning aid. Real prices, platform rules, contracts, taxes, institutional policies, technical performance and other conditions can differ from a simplified calculator model.

Pro mode: compare another scenario

Pro mode changes the most decision-relevant driver while keeping the rest of your inputs fixed. This makes it easier to answer questions such as “what if this cost is higher?”, “what if I have less time?” or “what if performance changes?” without rebuilding the whole calculation.

Frequently asked questions

What does the API Cost calculate?

Estimate request cost from input/output tokens and prices per million tokens.

What formula does the API Cost use?

Total cost = requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000.

What should I enter in the API Cost?

Use the examples shown under each field as a guide, then replace every sample value with the numbers from your own situation.

Is the API Cost result exact?

Estimate only. Use your own values and check important decisions against the relevant provider, contract or official rule.