AI CodeOps

AI coding cost calculator

Estimate what AI coding sessions cost your team each month. Enter your own model prices: the defaults are only an example. Everything is calculated in your browser.

Per session$0.43
Per developer per month$35.91
Team per month$359.10
Sessions per month840

How it's calculated

Each session's cost is its input tokens times the input price, plus its output tokens times the output price. Input served from a prompt cache is charged at the cached fraction of the input price. Monthly cost is the cost per session times developers, sessions per day and working days.

Step by step, with prices in US dollars per million tokens:

  • Sessions per month = developers × sessions per developer per day × working days per month.
  • Input cost per session = (input tokens × (1 − cached share) + input tokens × cached share × cached price fraction) ÷ 1,000,000 × input price.
  • Output cost per session = output tokens ÷ 1,000,000 × output price.
  • Per session = input cost + output cost.
  • Team per month = per session × sessions per month, and per developer per month = team per month ÷ developers.

A negative or empty field counts as zero, and a cached share above 1 is treated as 1, so the result is never negative or "not a number".

Assumptions

  • Every session is average. The calculator multiplies one typical session. Real sessions vary, and long agent sessions cost much more than short ones, because each model call resends the conversation so far.
  • Tokens are per session, not per call. Enter the total input and output across every model call in a session. That is why the input figure is large: agent loops send the growing context again on every turn.
  • One price pair. All sessions use the same input and output prices. If your team mixes models, run the calculator once per model, or enter a weighted average.
  • Cache reads only. The cached share is billed at the cached fraction of the input price. Some providers charge extra to write to the cache; that is not modelled.
  • Reasoning counts as output. For models that reason before answering, those tokens are usually billed as output, so include them in output tokens.
  • Tokens only. Seats, subscriptions and taxes are not included. Failed calls and retries are usually billed by the provider, so include them in your averages.
  • Example defaults. The starting values, including $3 and $15 per million tokens, are an example to edit, not any provider's price list.

A worked example

These are the calculator's starting values, run through the formulas above:

  • Sessions per month: 10 developers × 4 sessions a day × 21 working days = 840.
  • Input: 150,000 tokens, half of them from the cache at 0.1 of the price. That is 75,000 tokens at the full rate plus 75,000 × 0.1 = 7,500, so 82,500 tokens at $3 per million = $0.2475.
  • Output: 12,000 tokens at $15 per million = $0.18.
  • Per session: $0.2475 + $0.18 = $0.4275, shown as $0.43.
  • Team per month: $0.4275 × 840 = $359.10, or $35.91 per developer.

Set the cached share to 0 and input costs $0.45 a session, so the month comes to $529.20: caching saves about a third here. Keep the cache at half but double the input to 300,000 tokens, and the month is $567.00. Longer sessions usually raise input faster than output, which is why input tends to dominate the bill.

For why agent sessions cost what they do, and how caps and model choice change the bill, read How much does AI coding cost, and how do you control it?

From an estimate to a cap

In AI CodeOps every session shows what it actually cost, and workspaces can cap spend. Every model call is metered as it happens, including calls that fail part-way, and the cost of each session and agent step is on the session page. A workspace budget has a period (daily, weekly, monthly or a rolling 30 days), a soft limit that warns, a hard limit that stops new sessions and running ones before their next model call, and optional caps per workflow. Sessions run on the Economy, Standard or Premium tier, or Auto, which picks the tier per step; a workspace can also bring its own provider key, and the budget still applies. See cost controls, model tiers and pricing.

Embed this calculator

Paste this snippet into your own page or docs. The framed copy shows only the calculator, with a link back here, and is kept out of search results.

<iframe src="https://aicodeops.dev/tools/ai-coding-cost-calculator?embed=1" title="AI coding cost calculator" width="100%" height="640" style="border:0" loading="lazy"></iframe>
<p><a href="https://aicodeops.dev/tools/ai-coding-cost-calculator">AI coding cost calculator</a> by <a href="https://aicodeops.dev/">AI CodeOps</a></p>

Frequently asked questions

Is anything I enter sent anywhere?

No. The arithmetic runs in your browser as you type, and the calculator sends no request with your numbers. No account is needed.

Which prices should I enter?

Your provider's current input and output prices per million tokens for the model you use. Output is usually priced higher than input. If you use several models, run the calculator once per model or enter a weighted average.

How do I find tokens per session?

Measure them on your own work: a session's figure is the sum of input and output tokens over all of its model calls. In AI CodeOps, each session's page shows its tokens and cost, step by step.

Does it include prompt cache writes?

No. It prices cached input at the fraction you set and treats the rest as ordinary input. Some providers charge extra to write to the cache, so add a margin if yours does.

What does AI CodeOps cost?

AI CodeOps is free during the open beta, with a monthly AI allowance on the platform's models. Enterprise is priced per seat through sales.