Calculate the cost of total token usage
Copy the total input and total output counts from your API usage report. Choose the model and use its base rate, or enter the rate that actually applied to the workload. This calculator uses all the tokens you enter once. The AI token calculator projects one request across a chosen monthly volume instead.
Workload cost = (total input × input price + total output × output price) / 1,000,000
For example, one million input and 250,000 output tokens at $2 and $10 per million cost $4.50. If a provider offers a verified reduced rate on eligible asynchronous batches, enter those rates as custom inputs. A batch of requests is only eligible when you submit it using the provider's qualifying billing mode.
Reconcile usage from different jobs
Group your export by model and pricing tier before calculating. If a report covers two models, calculate each group and add the subtotals. For long-context requests, group by whichever context tier applied to the individual request. A million tokens accumulated over a month is not the same as a million-token prompt.
If you need to convert dollars per million to dollars for one or one thousand tokens, see cost per token. For billed Anthropic usage, the Claude calculator explains how to handle Claude token counts.
When the estimate differs from your invoice
This calculation models uncached text input and billed text output. Add cache reads, cache writes, tool calls, and separately billed media at their own rates. When comparing invoices month over month, also check the date range, billing currency, and any credits or taxes. Use your provider's usage breakdown to reconcile the bill.