LLM Token Pricing and Usage Cost Accounting: From Per-Million Quotes to Business Costs

    This article explains how to convert per-million-token quotes into per-token and per-request costs, account for input, output, cache, retry, and tiered pricing variables, build a reusable estimation model, and translate token spend into business-unit economics. Readers will learn how to reconcile a token price with actual usage and set up a reviewable cost model rather than relying on a single headline rate.

    LLM Token Pricing and Usage Cost Accounting

    “How much does each token cost in CNY?” looks like a simple division problem, but it is really a typical cloud service cost accounting problem. The token unit price is not a fixed number. Different models, billing dimensions, usage tiers, and input/output types can all change the final cost. A more reasonable approach is not to memorize a single price, but to build a reviewable cost model: first confirm the billing basis, then convert the quote into a per-token cost, and finally estimate the total budget based on business call volume.

    1. What Is a Token, and Why “Character Count” Is Not Enough

    A token is the basic unit used by large models to process text. Before text enters the model, it is split into a token sequence by a tokenizer. The model handles context and bills usage according to the number of tokens. Tokens do not have a one-to-one relationship with Chinese characters or English words. Different models use different tokenizers, so the same text may produce different token counts under different models. Chinese, English, punctuation, code, and numbers also have different tokenization efficiency. Therefore, you cannot accurately estimate cost simply with “character count × fixed coefficient.” You should use the tokenizer for the corresponding model or the token counting capability provided by the service provider.

    For cost estimation, at least three types of tokens should be distinguished:

    1. Input tokens: content that enters the model, such as user prompts, system prompts, conversation history, retrieval-augmented generation snippets, and tool return results.
    2. Output tokens: content generated and returned by the model.
    3. Cached or reused tokens: some services apply different billing rules for identical prefixes, cache hits, or batch tasks. The specific rules should be based on the price list.

    Many cost deviations come from focusing only on “how many characters the user entered” while ignoring system prompts, conversation history, and retrieval snippets. In real calls, input tokens are often much higher than the length of the user’s current sentence.

    2. Converting Per-Million-Token Quotes to Per-Token Costs

    Cloud service providers usually quote prices as “CNY X per one million tokens.” The conversion formula is straightforward:

    1. Per-token cost (CNY) = price per one million tokens (CNY) / 1,000,000

    Assume a provider quotes CNY 7.9 per 1 million tokens at a given billing tier. For illustration only:

    1. 7.9 / 1,000,000 = 0.0000079 CNY/token

    Further unit conversions:

    1. 0.0000079 CNY/token
    2. = CNY 0.0079 per 1,000 tokens
    3. = CNY 7.9 per 1 million tokens
    4. = CNY 790 per 100 million tokens
    5. = CNY 7,900 per 1 billion tokens

    In other words, the per-token cost is about CNY 0.0000079. A single token is extremely cheap, even below the common granularity of everyday currency units. However, LLM calls are characterized by very high volume, and cost can be rapidly amplified by the number of calls, context length, and output length.

    For example, if each request consumes an average of 1,000 input tokens and 500 output tokens, and the same assumed unit price applies:

    1. Tokens per request = 1000 + 500 = 1500
    2. Cost per request = 1500 / 1,000,000 × 7.9 = 0.01185 CNY
    3. Cost for 1 million requests = 0.01185 × 1,000,000 = 11,850 CNY

    A single request appears to cost only slightly more than CNY 0.01, but one million calls move the budget into the tens of thousands of CNY. This is why “a single token is very cheap” and “the total bill is not cheap” can both be true.

    3. Real Billing Usually Has More Than One Unit Price

    In actual cloud service billing, you cannot simply multiply one unit price by total tokens. Common billing dimensions include:

    • Separate input and output pricing: input tokens and output tokens may have different unit prices, and output usually needs to be accounted for separately.
    • Model tier differences: models with different parameter sizes and capability levels have different unit prices. You cannot use one model’s price to infer all models.
    • New-user and regular pricing: new-user discounts, free quotas, and promotional prices usually have time or quota limits. Once the quota is exhausted, regular pricing applies.
    • Tiered pricing: the unit price may change after usage reaches a certain scale, so costs need to be calculated segment by segment.
    • Cache hit pricing: identical prefixes or cache reuse may use different prices. The hit conditions need to be confirmed.
    • Batch and non-real-time task pricing: some services offer different billing methods for offline batch processing, but latency and applicable scenarios differ.
    • Failures, retries, and streaming output: retries increase token consumption. Streaming output does not change the token count itself, but it may affect output length control.

    Therefore, an accurate cost formula should be abstracted as:

    1. Total cost =
    2. billable input tokens × input unit price
    3. + output tokens × output unit price
    4. + cache hit tokens × cache unit price
    5. + other billing items

    All unit prices should be normalized to “CNY/token,” or uniformly use “CNY per million tokens” and divide by 1,000,000.

    4. A Reusable Cost Estimation Example

    The following is a general estimation function. Users fill in price parameters according to the actual price list. The code itself is not tied to any specific service provider.

    1. def price_per_token(price_per_million_yuan):
    2. return price_per_million_yuan / 1_000_000
    3. def estimate_cost(
    4. input_tokens,
    5. output_tokens,
    6. input_price_per_million,
    7. output_price_per_million,
    8. cached_input_tokens=0,
    9. cached_input_price_per_million=0
    10. ):
    11. billable_input = max(input_tokens - cached_input_tokens, 0)
    12. input_cost = billable_input / 1_000_000 * input_price_per_million
    13. cached_cost = cached_input_tokens / 1_000_000 * cached_input_price_per_million
    14. output_cost = output_tokens / 1_000_000 * output_price_per_million
    15. return {
    16. "input_cost": input_cost,
    17. "cached_cost": cached_cost,
    18. "output_cost": output_cost,
    19. "total_cost": input_cost + cached_cost + output_cost
    20. }
    21. # Conditional example: assume both input and output are priced at CNY 7.9 per 1 million tokens
    22. result = estimate_cost(
    23. input_tokens=1000,
    24. output_tokens=500,
    25. input_price_per_million=7.9,
    26. output_price_per_million=7.9
    27. )
    28. print(result)
    29. print("Reference per-token cost:", price_per_token(7.9), "CNY/token")

    The output of this example helps a team turn “cost per call” into concrete numbers. In actual use, replace the input unit price, output unit price, and cache unit price with the corresponding values in the console price list, and review them regularly because prices, promotions, and tier rules may change.

    5. Turning Token Costs into a Business Unit Economics Model

    Developers usually care less about “how much one token costs” and more about “how much one business action costs.” It is advisable to build three layers of metrics:

    1. Cost per call: track input tokens, output tokens, cached tokens, and retry counts for each request.
    2. Cost per business action: for example, how many tokens are consumed by one question-and-answer interaction, one summary, one ticket classification, or one code generation task.
    3. Cost per user or per unit scale: estimate monthly budgets by daily active users, monthly active users, per thousand calls, or per ten thousand tasks.

    An example metrics table can include:

    Metric Calculation Purpose
    Average input tokens Total input tokens / requests Determine whether context is too long
    Average output tokens Total output tokens / requests Determine whether output constraints are effective
    Cost per request Input cost + output cost + cache cost Evaluate call price
    Monthly cost per user Cost per request × requests per user Estimate user-scale budget
    Cache hit rate Cache hit tokens / cacheable tokens Evaluate optimization benefits
    Retry cost share Retry token cost / total cost Identify stability issues

    Only by mapping token costs to business actions can you judge whether a feature is sustainable. For example, for the same customer service question-and-answer interaction, if the system prompt and retrieval snippets are too long, the cost per call may be several times higher than the user-visible text. If the output lacks a length limit, long answers will significantly increase output cost.

    6. Cost Reduction Is Not Just Choosing a Cheaper Model

    Token cost reduction can proceed along two paths: “reduce usage” and “optimize unit price.”

    • Compress prompts: remove repetitive instructions, consolidate system prompts, and reduce unnecessary examples.
    • Trim context: keep only history relevant to the current question and summarize long conversations.
    • Control retrieval snippets: for retrieval-augmented generation, do not concatenate large numbers of documents without thought. Sort by relevance and limit the number of snippets.
    • Constrain output length: specify answer format, fields, and maximum length to reduce redundant explanations.
    • Use caching: evaluate cache reuse for stable prefixes, common questions, and fixed knowledge snippets.
    • Route models: use lightweight models for simple classification and extraction tasks, and use high-capability models for complex reasoning.
    • Batch non-real-time tasks: offline summarization and batch labeling can use batch tasks to reduce demand for real-time resources.
    • Monitor retries and exceptions: timeouts and failed retries generate additional tokens. Stability optimization is also cost optimization.
    • Set budget alerts: set token consumption and cost alerts by model, business line, and user group to avoid bill overruns caused by sudden traffic.

    Note that a low price does not equal low cost. If a low-priced model has insufficient output quality, leading to more rework, retries, or human intervention, the overall cost may be higher. A reasonable approach is to build a joint evaluation of quality and cost: choose a lower-cost solution while meeting business quality requirements.

    7. Common Pitfalls and Accounting Recommendations

    Common pitfalls include looking only at the input unit price and ignoring output tokens; looking only at new-user pricing and ignoring regular pricing after the quota is exhausted; estimating only by user input character count and ignoring system prompts and conversation history; ignoring retries, failures, and batch processing differences; and equating an extremely low per-token price with controllable total cost. Before procurement or launch, it is recommended to do three things:

    1. Confirm the current model, billing unit, input and output unit prices, free quota, tier rules, and cache rules in the service provider’s console or price list.
    2. Use real business samples to measure token distribution, covering at least average requests, long-context requests, and high-output requests.
    3. Build a monthly budget model and set up monitoring. Periodically use actual bills to back-calculate per-token cost and cost per business action.

    Returning to the initial question: how much does each token cost in CNY? Under the conditional calculation of “CNY 7.9 per 1 million tokens,” a single token is about CNY 0.0000079. However, this number only represents a reference value under one tier and one billing basis. Real cost must be calculated by combining model choice, input/output structure, cache hits, tiered pricing, and actual call volume. A single token is very cheap, but high usage can still make the bill expensive. Converting the unit price clearly, controlling usage, and understanding business costs are what make LLM usage sustainable.