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:
- Does revenue include enterprise custom contracts, subscriptions, and third-party channel revenue?
- Are the prices list prices or realized prices, and what date do they apply to?
- Is the input-to-output token ratio based on actual logs or an assumption?
- 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:
Blended price = (r × Input price + Output price) / (r + 1)
Where:
- r is the ratio of input tokens to output tokens. Input volume is
rtimes output volume, andrmust 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:
Blended price = (3 × 1 + 5) / (3 + 1)= 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:
Tier i token volume, in millions = R × s_i / p_iTotal monthly token volume, in millions = Σ(R × s_i / p_i)Effective average price, in CNY per million tokens= 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.
def mixed_price(r: float, p_in: float, p_out: float) -> float:"""Calculate a tier's blended price in CNY per million tokens."""if r <= 0:raise ValueError("r must be greater than 0")return (r * p_in + p_out) / (r + 1)def estimate_monthly_tokens(revenue_wan: float, tiers: list[dict]) -> float:"""Estimate total monthly token volume.revenue_wan: Monthly revenue in units of CNY 10,000.tiers: Each tier contains name, rev_share, r, p_in, and p_out.Returns: Total monthly token volume in millions of tokens."""total_m_tokens = 0.0for t in tiers:price = mixed_price(t["r"], t["p_in"], t["p_out"])tier_revenue_yuan = revenue_wan * 1e4 * t["rev_share"]total_m_tokens += tier_revenue_yuan / pricereturn total_m_tokensif __name__ == "__main__":revenue_wan = 100 # Illustrative data, not an actual disclosure.tiers = [{"name": "Tier A", "rev_share": 0.6, "r": 3, "p_in": 1, "p_out": 5},{"name": "Tier B", "rev_share": 0.4, "r": 3, "p_in": 4, "p_out": 28},]total = estimate_monthly_tokens(revenue_wan, tiers)avg_price = revenue_wan * 1e4 / totalprint(f"Monthly token volume: {total:,.0f} million tokens")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
- Set plausible low and high values for each key input, such as
r, discounts, and revenue shares. - Calculate token volume under the combinations of assumptions that produce lower and upper estimates.
- 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.
- 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.
ris 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.
