Token Cost

Estimate an AI workload’s token cost using separate input and output token prices.

How this calculator works

Enter input tokens, output tokens, input price per 1m tokens ($), output price per 1m tokens ($). Select Calculate to apply the displayed formula and review the labeled results.

Formula / method

Cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate)

Worked example

1,000,000 input tokens at $1/M and 250,000 output tokens at $4/M cost $2 in total.

Assumptions and limitations

Token counts and current per-million-token prices are supplied by the user in the same currency.

Provider pricing, cached tokens, batch discounts, reasoning tokens, tools and fine-tuning charges can require separate line items.

Sources and methodology references