A calculator to compare LLM API costs for your own token mix
Provider list prices checked 23 November 2026. Costs are list prices, not your invoice.
From SOMA AI, the Barcelona company that tracks and cuts the cost and carbon of company AI use. Written by SOMA AI's CTO with AI assistance and checked against the calculator page. Carbon, electricity and water figures are estimates by model class, not measurements.
Is there a calculator that compares LLM API costs for your usage, and do batch and caching change the answer? Yes to both. The free calculator at SOMA AI takes your monthly input and output tokens, the share of input that is cached, a batch on or off switch and a region. It shows list-price cost for the models you pick, next to estimated kWh, litres of water and kg CO2e. Caching and batch change the cost ranking in practical ways. They do not change the estimated energy per token, and the rest of this post shows why.
The default example
The page renders a default scenario as plain HTML, so you can check it without running JavaScript. The inputs are 100 million input tokens and 20 million output tokens a month, 30% of input cached, batch off, served from US East - N. Virginia. Six models are selected.
| Model | SAEF class | List price, USD a month | With caching, USD a month | Estimated kg CO2e a month | Estimated kWh | Estimated litres of water |
|---|---|---|---|---|---|---|
| Gemini 3.8 Flash | A | $150.00 | $129.75 | 0.809 | 2.28 | 5.52 |
| gpt-5.4-mini | A | $165.00 | $144.75 | 0.809 | 2.28 | 5.52 |
| Z.ai GLM 5.3 (served by Mistral) | C | $228.00 | $190.20 | 10.6 | 27.9 | 67.4 |
| Claude Sonnet 5.5 | B | $400.00 | $343.00 | 2.78 | 7.48 | 18.1 |
| gpt-5.6-terra | A | $440.00 | $386.00 | 0.809 | 2.28 | 5.52 |
| Claude Opus 5.5 | C | $800.00 | $686.00 | 10.6 | 27.9 | 67.4 |
The page summarises it this way. The cheapest at list price for this mix is Gemini 3.8 Flash at $129.75 a month. The lowest estimated CO2e is shared by gpt-5.6-terra, gpt-5.4-mini and Gemini 3.8 Flash at 0.809 kg a month each. It is a tie because they share a SAEF class. SAEF is SOMA AI's open set of emission factors.
Two things stand out. One, the cost spread is large. Claude Opus 5.5 is $800.00 at list and Gemini 3.8 Flash is $150.00 for the same token counts. Two, the carbon column does not follow price. gpt-5.6-terra costs $440.00 and has the same estimate as Gemini 3.8 Flash, because both sit in class A. The page shows a range for each class, for example 0.511 to 1.16 kg for class A, since the figure is for the class and not for the named model.
Gemini 3.8 Flash carries a scheduled change. From 1 January 2027 its input, cached input, output and batch rates double, so this row will not hold after that date.
How the arithmetic works
The page states its formulas, and they are simple enough to redo in a spreadsheet.
- Cached input tokens equal input tokens times the cached share. Fresh input is the rest.
- List-price cost is input tokens times input price, plus output tokens times output price, divided by one million.
- Cost with caching prices fresh input at the input price and cached input at the cached-input price. Cache-write and cache-storage charges are not included.
- Cost with batch is the same sum times 0.5 on Anthropic, OpenAI and Google rows, where each provider states a 50% discount. Batch is not applied to the Mistral-served rows, because their per-model batch prices are not verified.
What batch does
Anthropic, OpenAI and Google list asynchronous batch processing at 50% of the standard price, as does Mistral on its pricing page. The trade is latency, since results can take up to 24 hours. The calculator's batch switch halves the cost on the Anthropic, OpenAI and Google rows.
There are stacking caveats worth knowing, and the calculator encodes them. On OpenAI gpt-4.1, gpt-4o and o3, and on the Google rows, the cache discount is not stacked with batch, so cached tokens are billed at the batch input price. On Claude and on the gpt-5 and gpt-6 families, Anthropic and OpenAI list prices that let both discounts apply. Anthropic also warns that requests in a batch run in any order, so a cache entry can expire before a follow-up request runs. The batch saving is solid and the stacked saving is less certain.
What caching does
The cached share of input is billed at each model's cached-input price. In the default example, 30% cached takes Claude Opus 5.5 from $800.00 to $686.00. The calculator leaves out cache-write and storage charges, which in 2026 can be material, so treat the caching column as an upper bound on the saving and read the prompt caching page for the break-even reads.
Why neither changes energy per token
SAEF estimates electricity from effective tokens. That is output tokens, plus a weight times fresh input tokens, plus a smaller weight times cached input tokens, divided by a token basis and multiplied by a class factor for the region. CO2e adds hardware, construction and amortised training terms.
The inputs are tokens, model class and grid. Nothing in that formula depends on whether a request was submitted in a batch. SAEF models no batch discount on energy, because the sources checked do not publish whether providers run batch work on idle or cleaner capacity. The batch page's worked example makes the point plainly. One million Claude Sonnet 5.5 tokens, split 800,000 input and 200,000 output, cost $3.60 in real time and $1.80 as a batch, and the estimate is 28.1 g CO2e in both cases. The price halves and the estimate does not move.
Caching is different in a small way. A cached input token carries a lower weight than a fresh one in the formula, so the estimate does fall a little when more of the input is cached, but far less than the price falls. Batch is a cost lever. It reduces carbon only if the delay it tolerates also lets you use a smaller model class or a cleaner region, and those two changes show up directly in the calculator's table.
What the calculator does not claim
- That the cost is your invoice. It excludes negotiated discounts, cache-write and storage charges, long-context rates and regional uplifts.
- That a figure is a measurement or applies to the named model. It is an estimate for the model's class.
- That a cheaper model is a lower-carbon model, or good enough for your task. Test quality on your own requests.
- That token counts compare across models. Tokenizers differ.
- That a provider runs a model in the region you choose. The region is an input.
Put your own volumes into the calculator, then read the batch page if half-price delayed work fits part of your workload.
Disclosure: published by SOMA AI (somaai.earth), which publishes the SAEF dataset and sells AI cost and carbon tracking. Drafted with AI assistance. Canonical version: somaai.earth.

