Methodology — how TokenPrice calculates costs
The formulas, assumptions and worked examples behind the cost calculation, so readers can reproduce every number step by step.
Effective price rules
Every quote starts from its base price; the more specific the conditions you supply (Batch / service tier / context band / time window), the more specific tier applies. A matching tier replaces the base price as a whole — never multiplied or subjectively stacked. With no tier hit, the base price applies; items the vendor does not differentiate render as “—”, never 0.
Monthly bill formula (pay-as-you-go)
Monthly bill = monthly input × (1−r) × P(miss) / 10⁶ + monthly input × r × P(hit) / 10⁶ + monthly output × P(output) / 10⁶ − promo deduction (r = cache hit rate; P = the channel's matched per-million unit price)
Each pay-as-you-go bill follows the formula above term by term: peak/off-peak weighted by duration, tiers computed for your chosen band — never a monthly average.
Some vendors publish a single generic “input” price without differentiating cache states: P(miss) = P(hit) = P(input), so the hit rate does not change the bill — an equivalent simplification, not an estimate.
When a vendor does not publish an input or output unit price, the channel's monthly bill cannot be computed and the item renders as “—”, never 0.
Break-even
Subscription monthly fee ÷ your blended cost per million tokens ≈ break-even monthly input x*. Below x*, pay-as-you-go is cheaper; above x*, the subscription is cheaper. Comparison rows scale your chosen output ratio and hit rate proportionally. Results exclude quota caps and overage terms; overage segments (metered / blocked / throttled) follow the vendor's terms and are disclosed, never extrapolated.
Profiles and assumptions
The three usage profiles are v1 initial assumptions: input:output ≈ 10:1 is a common coding-scenario assumption, and cache hit rates rise with agentic workloads. After launch they are recalibrated with real calculator input distribution; the version number is displayed alongside. All conversions are labelled “Profile v1 · estimated”.
| Monthly input | Monthly output | Cache hit rate | |
|---|---|---|---|
| Light · daily coding | 50M | 5M | 30% |
| Daily · heavy vibe coding | 300M | 30M | 50% |
| Heavy · long agent tasks | 1.5B | 150M | 70% |
Profile version vv1 · The three profiles are v1 initial assumptions, recalibrated with real usage data (version shown alongside).
The three usage profiles are v1 initial assumptions: input:output ≈ 10:1 is a common coding-scenario assumption, and cache hit rates rise with agentic workloads. After launch they are recalibrated with real calculator input distribution; the version number is displayed alongside. All conversions are labelled “Profile v1 · estimated”.
Credit conversion and the estimation template
Credit quota conversion follows the three-level strategy; with no basis the output is "cannot be converted accurately" and no per-million-token cost is generated.
Three-level strategy for conversion ratios: officially published ratio → exact; derivable from official top-up rules → computable (with the derivation disclosed); community measurements (n≥3, time-bounded) → estimated (with method labelled); no basis at all → unknown, output “cannot be converted accurately”.
Unified estimation-method template: source / sample size / time window / method (e.g. official quota figures (GLM Coding Plan pricing page) / rule derivation / 2026-11-14 page snapshot / conservative floor of window_5h and weekly figures × 4 weeks/month).
Cannot be converted accurately: the official ratio is not published. We do not invent numbers.
When conversion is impossible we show the original quota wording, generate no per-million-token cost, and invent no numbers.
Promo stacking
Level order: offer > plan > channel > vendor; the highest-level candidate is the primary promo. Stackable candidates are absorbed in the same order and applied chained to the current bill value; non-stackable candidates are mutually exclusive — only the primary applies.
A “limited-time flat price” that is a recovery-price preview (the price after expiry) never participates in any discount calculation.
Exchange rates
Converted prices shown for comparison use the ECB reference rate, with the fetch time (as_of) and data date disclosed; converted prices are never stored. Calculator amounts are always shown in the vendor's native currency — no cross-currency combining.
Data as-of and evidence
Every quote used in a calculation carries its last-verified time and a “view source” snapshot link; the worked example on this page uses fixed sample values, not live quotes. Site-wide data as-of appears in the footer.
End-to-end worked example (reproducible)
Profile = light (50M monthly input / 5M monthly output / 30% cache hit rate); pay-as-you-go unit prices = canonical sample prices (miss 4.50 / hit 0.15 / output 27.00 per 1M tokens, CNY); subscription fee for comparison = 118 CNY/mo.
Step 1 · Monthly bill (pay-as-you-go)
Miss portion: 50M × (1−30%) = 35M × 4.50 CNY/1M = 157.50 CNY; hit portion: 50M × 30% = 15M × 0.15 CNY/1M = 2.25 CNY; output portion: 5M × 27.00 CNY/1M = 135.00 CNY; monthly bill = 157.50 + 2.25 + 135.00 = 294.75 CNY (no promo).
Step 2 · Break-even (vs 118 CNY/mo subscription)
Break-even input x* = 50M × 118 ÷ 294.75 ≈ 20.0M. Check: input 20.0M (output ratio 10:1 → 2.0M, hit rate 30%): 14.0M×4.50 + 6.0M×0.15 + 2.0M×27.00 = 63.00 + 0.90 + 54.00 ≈ 118 CNY ✓
Conclusion: below ≈20M monthly input, pay-as-you-go is cheaper; above ≈20M, the subscription is cheaper (quota caps and overage terms excluded in this example).
Sample prices are not live quotes; the shipped calculator is populated from build-time real data with the data as-of disclosed.
Honest boundaries
- · Derived from public rules and explicit assumptions; the estimation method is labelled alongside.
- · Estimated values participate in comparisons with labels only and never enter any “lowest price” ranking.
- · Image / speech / fine-tuning prices are shown in their official units and excluded from token cost calculation (units are not commensurable).
- · Time-window weighting assumes a standard week; holiday terms follow the vendor's own policy.
- · The three profiles are v1 initial assumptions, recalibrated with real usage data (version shown alongside).