Formula: AI Model Cost Comparison Calculator
- I,O: Input and output token counts
- pᵢ,pₒ: Input and output price per million tokens
Compare per-request costs for two models using rates you supply.
Compare rates $2/$8 and $1/$4 per million input/output tokens.
This calculator compares price only. Evaluate quality and latency on your own workload.
The three supporting lines are rounded to the cent, so on the default request they all show $0.01. The summary sentence underneath gives four decimal places: 0.0104 for Model A and 0.0052 for Model B. The verdict uses the unrounded totals. For monthly figures that read cleanly to the cent, enter the month's token totals instead.
Multiply the per-thousand rate by a thousand to get a per-million rate, then enter that. The fields are labelled per million and the formula divides by 1,000,000, so a per-thousand figure entered as-is will make the cost look a thousand times smaller than it is. Check both models are converted the same way.
Only as a first estimate. Tokenizers differ, so the same text may be counted differently, and models vary a lot in how long their answers are. For a real decision, measure billed tokens for each model on a sample of your own prompts, and compare the costs using each model's own counts rather than a shared figure.
The verdict says both models cost the same and the difference line shows $0.00. No winner is named. That usually means your workload sits on the crossover point between the two rate cards, so a small change in prompt or answer length will decide it. Test a slightly larger and smaller workload before relying on the comparison.
Not in one run. The form has fields for two price lists only. To compare three or more, keep one model fixed as Model A and change Model B's rates each time, noting the cost line for each. Because the workload stays the same, the totals are directly comparable across runs.
Blend the input rate. If, say, 60% of your input tokens would be served from cache at a lower rate, enter a weighted average: 60% of the cached rate plus 40% of the standard rate. Do this separately for each model, since cache pricing and cache behaviour differ between providers. The calculator itself has no cache field.
No. It only changes the symbol shown next to the results. The engine assumes both models' rates are already in the selected currency. If the two providers bill in different currencies, convert one rate yourself using the exchange rate you expect to pay, including any card or bank fees on foreign currency charges.
Where a model produces internal reasoning tokens that are billed, they are usually charged at the output rate, so include them in the output token count. They can be a large share of the bill on some tasks. If you only count the visible answer, a reasoning model can look far cheaper here than it turns out to be.
Divide the extra output cost per million of the cheaper-input model by its input saving per million. In the worked case, Model A saves 1 on input but costs 6 more on output, so the crossover is six input tokens per output token. Workloads above that ratio favour Model A. The calculator confirms it with tied totals.
No. It is token count times rate and nothing else. Sales tax or VAT, platform fees, minimum monthly commitments, prepaid credit bonuses and enterprise discounts all change what you pay. If either provider gives you a negotiated rate, enter that instead of the list price, and add tax afterwards if it applies to both equally.
The long-document preset, 100M input tokens with 2M output in a month. It represents feeding in large files and getting short answers back. At the default rates it shows $216.00 for Model A and $108.00 for Model B. With that much input, the input rate dominates the bill, so compare models mainly on what they charge to read.
This calculator compares two price lists against a single workload. You describe the work once, as a count of input tokens and output tokens, and then type in what each model charges per million of each. It multiplies, adds and tells you which total is lower.
The default workload is one request with 2,000 input tokens and 800 output tokens. Model A is priced at 2 per million input tokens and 8 per million output tokens. Model B is priced at exactly half of both: 1 and 4. The verdict line reads "Lower cost for this workload: Model B".
The supporting lines show Model A at $0.01, Model B at $0.01 and a cost difference of $0.01. Those are rounded to the cent, and a single request costs a fraction of a cent, so they look alike. The sentence under the result carries the precise figures: A 0.0104 and B 0.0052. Read that line, not the cent amounts, when you are pricing one call.
The rates are placeholders, not anyone's actual prices. Before you rely on a result, replace all four with the current published rates for the two models and tiers you are considering.
Apply the formula shown on the page, Cost = Input Tokens x Input Rate / 1,000,000 + Output Tokens x Output Rate / 1,000,000, and start with Model A. Its input part is 2,000 times 2 divided by a million, which is $0.004. The output part is 800 times 8 divided by a million, which is $0.0064. Together that is $0.0104 per request.
Model B uses the same token counts at half the rates, so each part halves: $0.002 for input and $0.0032 for output, or $0.0052 in total. The true difference is $0.0052 per request, a little over half a cent.
Rounded to cents, $0.0104 becomes $0.01 and $0.0052 becomes $0.01 as well, and the difference of $0.0052 also rounds to $0.01. That is why the summary sentence prints four decimal places alongside the rounded lines.
The verdict always comes from the unrounded totals. If you give the two models labels in the name fields, the verdict uses those labels, so a result reads with the names you typed rather than A and B.
Per-request figures are useful, but most budgets are monthly. The fields accept any token count, so you can put in the total for a day, a week or a month of real use. The arithmetic is linear: scaling the workload scales every result by the same factor and the comparison stays fair.
The page includes a preset for this. Its month of chat uses 20M input tokens and 8M output tokens at the default rates. Model A comes to $104.00 and Model B to $52.00, a difference of $52.00. That is the default request repeated ten thousand times, and the proportions are unchanged: B is half the price because both of its rates are half of A's.
For a real decision, take the token totals from your usage logs or billing export for the past month. That captures the actual mix of short and long prompts, which an average request can hide. If you only have per-request figures, multiply by your expected request volume before typing them in.
A related calculator on this site turns daily requests and per-request averages into a monthly budget, which can be a convenient way to get the totals first.
The default case is easy because Model B is cheaper on both rates, so it wins for every possible workload. Real comparisons are rarely that tidy. One model often has the cheaper input rate and the other the cheaper output rate, and then the token mix decides the answer.
Here is a case run through the engine. Give Model A rates of 1 for input and 10 for output, and Model B rates of 2 and 4. With the monthly chat preset of 20M input and 8M output tokens, Model B wins at $72.00 against $100.00. With three million input tokens and half a million output, the two totals meet at $8.00 and the verdict reads that both models cost the same.
You can find the crossover without the calculator. Model A saves 1 per million on input but costs 6 more per million on output. The two cancel when there are six input tokens for each output token. Above that ratio, the cheaper input rate wins; below it, the cheaper output rate does.
This is worth doing for your own workload. Tasks that feed in long documents and return short answers, like classification or extraction, sit at a high ratio. Tasks that write long text from short prompts sit at a low one. The same pair of price lists can favour different models for each.
The long-document preset, 100M input tokens with 2M output, sits at fifty input tokens per output token, far above six. At the default rates it shows $216.00 against $108.00, but swap in the mixed rate cards above and the cheaper-input model takes over.
When the two totals come out equal, the calculator does not pick a winner. The verdict says both models cost the same, the difference line shows $0.00, and the summary sentence gives the shared cost. Give Model B the same rates as Model A at the default workload and you get both at 0.0104.
A tie is more informative than it sounds. It usually means you are sitting on the crossover ratio for that pair of price lists, so a small change in how long your prompts or answers are will tip the result one way or the other. Before choosing on price, try nudging the input and output counts by a tenth in each direction.
A tie on price also means price should not decide the question. Quality, speed and how often a model needs a retry become the deciding factors.
The calculator applies the same input and output token counts to both models. That is a fair comparison only if both models really would use the same number of tokens for the job, and often they do not.
Different models split text into tokens differently, so the same prompt can count as a different number of input tokens on each. Output length varies even more. One model may answer in a paragraph where another writes three, or may need extra reasoning tokens that are billed as output. A model with a lower output rate can still cost more if it reliably writes twice as much.
The better approach is to run a sample of your real prompts through both models, record the billed input and output tokens for each, and then use this calculator twice with each model's own counts. Set the other model's rates to the same values as the first in each run, and read the cost line for the model you care about. It takes longer, but it compares what you would actually pay.
Quality, speed and reliability are separate questions again. A cheaper model that needs a retry one time in five can end up costing more than its rates suggest.
Even on the default single request, where both lines read $0.01, a model that writes twice as many tokens would double its output cost and could overturn the verdict.
Real price lists have more than two numbers. Many providers charge less for input tokens served from a cache, offer a discount for work submitted in batches that can wait, and charge higher rates once a prompt passes a certain length. Some add fees for tool calls, search or image inputs.
None of that is in this calculator. It treats every input token at one rate and every output token at another. If a meaningful share of your input would be cached, a blended input rate is a reasonable workaround: weight the cached and uncached rates by the share of tokens in each and enter the result.
Do the same for a batch discount, applied to whichever share of your traffic can tolerate the delay. Long-context surcharges are harder to blend, since they depend on how many individual requests cross the threshold. If many do, run those requests as a separate workload at the higher rates.
There are separate calculators on this site for cache savings and batch savings, which handle those effects more directly.
The currency selector changes the symbol only. Switch to euros and the defaults show the same figures with a euro sign. No conversion happens, so enter the rates in whatever currency you select. If one provider bills in dollars and the other in another currency, convert one of them yourself before entering it.
Rates are per million tokens. Some price lists quote per thousand tokens. If yours does, multiply by a thousand before entering it, or every result will be a thousand times too small. That is the most common input error with this kind of tool.
Token counts cannot be negative; the engine rejects them with an error. Zero is allowed, and setting output to zero is a quick way to compare input costs alone. The model name fields are labels only and change nothing in the maths.
Zero tokens on both sides is accepted and reported as a tie at zero cost, which is a quick way to confirm the fields are cleared before entering a new workload.