Skip to content
Technologyai

AI API Cost Comparison Calculator

Model cost comparison with retries counted. A cheaper model that needs a second attempt on a fifth of requests is not a fifth cheaper, and the break-even retry rate is what decides the choice.

Also called: llm pricing comparison, model cost comparison.

%
Cheaper option
Model B is cheaper

Model B is cheaper. Model A costs ₹1,75,000 a month and model B ₹56,000 including a 0% retry rate, a difference of ₹1,19,000 or 68%. Model B stops being cheaper above a 212.5% retry rate.

Model A
₹1,75,000
Model B
₹56,000
Model B before retries
₹56,000
Difference
₹1,19,000
Difference as a percentage
68%
Self hosting
₹2,50,000
Retry rate at which they cost the same
212.5
On retries
Model B stops being cheaper above a 212.5% retry rate.
On prices
Prices are inputs, not constants. Model pricing changes often, so take the current rate from the provider rather than relying on a default here.
Method and background

How this is calculated

Both models are priced on the same token volumes. The retry rate is the input that makes this honest: a cheaper model that fails or produces unusable output some of the time costs its rate card plus the retries, and often plus a fallback to the expensive model. The break-even retry rate shown is where the two become equal, which is usually a lower number than people expect. Self hosting is a fixed cost against a variable one, so it wins only above a volume threshold and carries operational cost that no rate card shows.

a cheaper model that needs retries is not as cheap as its rate card suggests
r
Retry rate

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

a cheaper model with no retries

Requests a month
2,00,000
Average input tokens
1,500
Average output tokens
400
Model A input per million
₹250
Model A output per million
₹1,250
Model B input per million
₹80
Model B output per million
₹400
Extra retries needed on the cheaper model
0%
Compare against self hosting
No
Self hosting monthly cost
₹2,50,000

Cheaper optionModel B is cheaper

300M in at 250 plus 80M out at 1250

Open this example

retries erode the saving

Requests a month
2,00,000
Average input tokens
1,500
Average output tokens
400
Model A input per million
₹250
Model A output per million
₹1,250
Model B input per million
₹80
Model B output per million
₹400
Extra retries needed on the cheaper model
50%
Compare against self hosting
No
Self hosting monthly cost
₹2,50,000

Cheaper optionModel B is cheaper

boundary: half the requests attempted twice

Open this example

Method and limits

What it assumes

  • Identical token volumes on both models, which different models rarely produce.

What it deliberately does not model

  • Different models produce different output lengths for the same task, which this holds constant.
  • Quality differences are not captured by any cost comparison.
  • Self hosting cost excludes engineering time, which usually dominates.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Is the cheaper model always cheaper?
Only below the break-even retry rate. A model at a third of the price that needs two attempts on half of requests has given the saving back.
When does self hosting pay?
Above a volume threshold, and only if you exclude nothing. The infrastructure is the visible cost and the engineering time to run it reliably is usually larger.