Estimating LLM Token Usage from Revenue: A Reproducible Workflow

    Learn how to estimate monthly LLM token usage from revenue, input and output prices, and pricing-tier revenue shares. This workflow includes Python code, sensitivity analysis, and a checklist for handling discounts, cached tokens, and uncertainty.

    1. Define the Data Scope

    Before estimating token usage, identify your data sources and assess their reliability. The table below summarizes common sources and validation steps.

    Data item Common sources Reliability Validation steps
    Revenue Audited financial statements, listing or fundraising documents, media reports Audited statements provide the strongest evidence; investor presentation figures require particular caution Check the reporting period, currency, and revenue scope. Mark unaudited figures as unverified.
    Pricing Official pricing pages, publicly available third-party quotes Official pricing pages are generally more reliable Record the pricing date and distinguish list prices from realized prices.
    Tier mix Revenue share or token share by pricing tier Depends on the detail disclosed If only revenue shares are available, use tier prices to convert them into token shares.
    Reporting scope Disclosure notes and footnotes Often overlooked Check whether figures include custom contracts, subscriptions, third-party channels, and cache hits.

    Before calculating, answer these questions:

    1. Does revenue include enterprise custom contracts, subscriptions, and third-party channel revenue?
    2. Are the prices list prices or realized prices, and what date do they apply to?
    3. Is the input-to-output token ratio based on actual logs or an assumption?
    4. Are cache-hit tokens billed at a lower rate, and are they handled separately in the estimate?

    Do not directly combine or compare figures with incompatible definitions. Align their scope first.

    2. Calculate the Blended Price for Each Tier

    Input and output tokens usually have different prices, with output tokens often costing more. Calculate a blended price using the input-to-output token ratio:

    1. Blended price = (r × Input price + Output price) / (r + 1)

    Where:

    • r is the ratio of input tokens to output tokens. Input volume is r times output volume, and r must be greater than zero.
    • Input price and output price are measured in CNY per million tokens.
    • Blended price is the average price per million tokens for that tier.

    For example, suppose a tier charges CNY 1 per million input tokens and CNY 5 per million output tokens. If r = 3, input volume is three times output volume:

    1. Blended price = (3 × 1 + 5) / (3 + 1)
    2. = CNY 2 per million tokens

    The value of r depends on the workload. Long-document analysis and long-context question answering tend to have a larger input share and therefore a higher r. Code generation and long-form writing tend to have a larger output share and a lower r.

    Use actual logs to determine r rather than relying on intuition. If logs are unavailable, specify a range and test it in the sensitivity analysis.

    3. Calculate the Effective Average Price and Token Volume

    Because tiers have different blended prices, the overall average must account for both their revenue shares and their prices. Do not take a simple revenue-weighted arithmetic average of tier prices. First convert revenue into token volume for each tier.

    Let monthly revenue be R, tier i have revenue share s_i, and its blended price be p_i:

    1. Tier i token volume, in millions = R × s_i / p_i
    2. Total monthly token volume, in millions = Σ(R × s_i / p_i)
    3. Effective average price, in CNY per million tokens
    4. = R / Total monthly token volume in millions

    The following Python code implements these calculations. Revenue is entered in units of CNY 10,000, and the function returns token volume in millions.

    1. def mixed_price(r: float, p_in: float, p_out: float) -> float:
    2. """Calculate a tier's blended price in CNY per million tokens."""
    3. if r <= 0:
    4. raise ValueError("r must be greater than 0")
    5. return (r * p_in + p_out) / (r + 1)
    6. def estimate_monthly_tokens(revenue_wan: float, tiers: list[dict]) -> float:
    7. """
    8. Estimate total monthly token volume.
    9. revenue_wan: Monthly revenue in units of CNY 10,000.
    10. tiers: Each tier contains name, rev_share, r, p_in, and p_out.
    11. Returns: Total monthly token volume in millions of tokens.
    12. """
    13. total_m_tokens = 0.0
    14. for t in tiers:
    15. price = mixed_price(t["r"], t["p_in"], t["p_out"])
    16. tier_revenue_yuan = revenue_wan * 1e4 * t["rev_share"]
    17. total_m_tokens += tier_revenue_yuan / price
    18. return total_m_tokens
    19. if __name__ == "__main__":
    20. revenue_wan = 100 # Illustrative data, not an actual disclosure.
    21. tiers = [
    22. {"name": "Tier A", "rev_share": 0.6, "r": 3, "p_in": 1, "p_out": 5},
    23. {"name": "Tier B", "rev_share": 0.4, "r": 3, "p_in": 4, "p_out": 28},
    24. ]
    25. total = estimate_monthly_tokens(revenue_wan, tiers)
    26. avg_price = revenue_wan * 1e4 / total
    27. print(f"Monthly token volume: {total:,.0f} million tokens")
    28. print(f"Effective average price: CNY {avg_price:.2f} per million tokens")

    All revenue figures, shares, and prices in this example are hypothetical. They demonstrate the calculation and do not represent any actual provider.

    The results are:

    • Tier A blended price: CNY 2 per million tokens.
    • Tier B blended price: CNY 10 per million tokens.
    • Tier A revenue: CNY 600,000, corresponding to 300,000 million tokens, or 300 billion tokens.
    • Tier B revenue: CNY 400,000, corresponding to 40,000 million tokens, or 40 billion tokens.
    • Total monthly volume: 340 billion tokens.
    • Effective average price: approximately CNY 2.94 per million tokens.

    Tier A accounts for 60% of revenue but approximately 88% of tokens. This difference is why revenue shares must be converted into token shares.

    4. Run a Sensitivity Analysis

    The estimate depends on several inputs. Changing one input at a time helps identify which assumptions have the greatest effect.

    The following table uses the example above as the baseline. Each scenario changes only the stated assumption; when Tier A’s revenue share falls to 50%, Tier B accounts for the remaining 50%.

    Scenario Change Monthly token volume Change from baseline
    Baseline Tier A r = 3 340 billion 0%
    Lower Tier A input-to-output ratio r = 2; Tier A blended price is approximately CNY 2.33 per million tokens Approximately 297.1 billion Approximately −12.6%
    Higher Tier A input-to-output ratio r = 4; Tier A blended price is CNY 1.80 per million tokens Approximately 373.3 billion Approximately +9.8%
    Lower Tier A revenue share Share falls from 60% to 50% 300 billion Approximately −11.8%
    Realized prices below list prices Realized prices are 70% of list prices across both tiers Approximately 485.7 billion Approximately +42.9%

    Two inputs have a substantial effect in this example.

    The first is r. Relatively small changes produce roughly 10% variation in estimated volume, so use logs to establish a plausible range.

    The second is the pricing basis. If realized prices are below list prices, an estimate based on list prices will understate token volume. Conversely, using a discounted price where the applicable price is the list price will overstate volume.

    Token volume is inversely related to the blended price. At unchanged revenue, a 10% increase in blended price reduces estimated token volume by approximately 9.1%.

    5. Common Pitfalls and Estimation Ranges

    Pitfall Effect How to detect it How to correct it
    Inconsistent scope Revenue includes custom contracts, but prices cover only publicly listed plans, creating a potentially large mismatch Check whether revenue and prices cover the same business activities Exclude unmatched revenue or add the corresponding prices
    Unaudited data Revenue in investor presentations may differ from financial statements Check whether the source is an audited report Mark the figures as unverified and model them as a separate scenario
    Confusing list and realized prices Using list prices may understate token volume Look for discounts, volume agreements, or free allowances Recalculate with realized prices or specify a discount range
    Ignoring cache hits Failing to separate lower-priced cached tokens can distort the estimate Check whether disclosures distinguish cached and uncached tokens Calculate the two categories separately using their respective prices
    Treating r as fixed Changes in workload mix make the estimate less representative Compare logs across reporting periods Use a range rather than a single value
    Presenting estimates as official figures Readers may assume the result is suitable for auditing or formal disclosure Check whether the document clearly labels the result as an estimate State the assumptions, error sources, and intended use

    Build an Estimation Range

    1. Set plausible low and high values for each key input, such as r, discounts, and revenue shares.
    2. Calculate token volume under the combinations of assumptions that produce lower and upper estimates.
    3. Report the resulting range and identify sources of error it does not cover, such as undisclosed subscription revenue, third-party channels, or enterprise custom contracts.
    4. If the range is wide, state clearly that the estimate supports only an order-of-magnitude assessment, not precise budgeting.

    Prepublication Checklist

    Before publishing or using the estimate, confirm that:

    • Revenue data is audited, or clearly marked otherwise, and reporting periods and currencies are consistent.
    • Prices include a reference date and distinguish list prices from realized prices.
    • r is based on logs where available and is greater than zero.
    • The treatment of caching, subscriptions, custom contracts, and third-party channels is explained.
    • Results are presented as a range, with assumptions and limitations.

    Revenue-based estimation can help assess whether a token-volume claim is plausible. It cannot replace a provider’s official usage statistics.