Cost per token
Also known as Token price, LLM token cost
Definition
Cost per token is the price charged for processing a defined number of input or output tokens. Providers commonly quote separate input and output rates, and some offer lower prices for cached or batched work.
The simple calculation
Multiply the number of tokens in each billing class by that class's rate, then add the results. Input and output tokens usually have different prices. A request with a long repeated context can cost more than a short request even when both return the same number of words.
Price is only one variable
A cheaper model can require retries, longer prompts, or more human correction. Compare cost per completed task, not only cost per request. Weave makes that comparison possible by joining token spend to route and outcome data.
Keep rates current
Provider prices and cache rules change. Store the rate card version used for each calculation and refresh it when a provider changes its terms.
When comparing providers, normalize the unit and billing class first. A quoted price is not a forecast of monthly spend until it is multiplied by the workload's actual token distribution.
How this relates to Weave
Weave combines provider prices with actual input, output, and cached token counts. Teams can see where spend comes from and compare token cost with latency, quality, and completed task value.
Explore Token intelligence