How to Calculate the True Cost of LLM Services
Monthly fees alone do not show what an LLM service will cost. This article explains how tokens, model tiers, input and output weights, short-window and period quotas, and real usage mix determine spend, then outlines a four-step way to compare subscriptions with pay-as-you-go using assumed figures only.
1. Why “cheap” has to be defined first
When choosing a large language model service, people usually start by comparing monthly fees. A monthly fee is only the starting point. What actually drives spend is the metering unit, quota limits, caching behavior, and the structure of real usage. The same monthly fee can cost several times more for a team that frequently processes long documents than for an individual who occasionally asks short questions.
This article starts from billing mechanics and discusses how to evaluate subscription and pay-as-you-go plans in a systematic way. All figures are illustrative assumptions used to show the calculation method. They do not represent the real prices of any specific service.
2. Understanding the metering unit: from tokens to a unified credit
Most LLM services meter usage in tokens. A token is the smallest unit into which the model splits text. An English word usually maps to one or two tokens, and a Chinese character usually maps to one or two tokens, depending on the tokenizer.
Because inference cost varies widely across models, providers often convert usage into an internal unified unit. The conversion rules usually include two kinds of coefficients:
- Model-tier coefficient: stronger models with higher inference cost consume units faster.
- Input and output coefficient: generating output requires step-by-step decoding and costs more compute than processing input, so output tokens are usually weighted higher.
Suppose the base tier consumes 1 unit per thousand tokens, the mid tier uses a coefficient of 1.5, the high tier uses a coefficient of 4, and output is weighted at 4 times input. Processing the same 1 million input tokens on the high tier then consumes about 4 times the quota of the base tier.
Before comparing plans, confirm the provider’s conversion rules. Otherwise the question “how much can I use each month” cannot be answered, because the quota unit itself has no single meaning.
3. Quota mechanics: short-window caps and period totals
Many subscription plans set two kinds of limits at once:
- Rolling short-window cap: usually refreshes every few hours and constrains burst usage.
- Period total cap: usually counted weekly or monthly and constrains cumulative usage over time.
The two limits serve different situations. The short window decides how much work one continuous session can finish, which matters for interactive development, long debugging conversations, and other peak workloads. The period total decides how much work can be produced in a week or a month and directly shapes the long-term budget.
A marketed “multiple” needs a clear referent. A plan that claims “five times the usage” may apply that multiple only to the short window, while the weekly total uses a different multiple. Compare the two caps separately.
The following assumed figures illustrate the difference:
| Plan | List price (relative) | Short-window cap | Weekly cap | Weekly cap vs. base plan |
|---|---|---|---|---|
| Base | 1 | 100 | 1000 | 1.0x |
| Advanced | 5 | 500 | 4000 | 4.0x |
| Premium | 10 | 2000 | 5000 | 5.0x |
The premium plan is priced at twice the advanced plan. Its short-window cap is four times higher, but its weekly total is only 25% higher. If the work is mostly long, continuous, interactive tasks, the premium plan’s peak capacity is useful. If the work is mostly steady, evenly paced batch jobs, the advanced plan has a lower unit cost.
4. A consistent way to judge value for money
Evaluation can follow four steps.
- Choose a baseline: treat a base plan, or the pay-as-you-go price you use today, as 1.0.
- Measure the real usage mix: record the ratio of input to output tokens, the share of usage on each model tier, and the average context length.
- Convert to an equivalent cost: multiply the same usage by pay-as-you-go unit prices to get “what this usage would cost if billed by volume.”
- Calculate the value multiple: divide that equivalent cost by the subscription fee. A higher multiple means the subscription is more economical.
The function below implements steps 3 and 4:
def value_ratio(monthly_fee: float, usage_tokens: dict, unit_prices: dict) -> float:"""usage_tokens: {"input": total input tokens, "output":
