LLM Selection When Benchmark Scores Tie: How to Calculate Real Cost
When composite benchmark scores are close, leaderboard rank alone is not enough for model selection. This article explains how token pricing, input/output mix, parameter scale, reasoning tokens, and per-task token usage affect the actual bill. It also provides a per-task cost formula, an example calculation, evaluation caveats, a selection checklist, and a process for building an internal cost baseline.
1. Similar Composite Scores Do Not Mean Similar Costs
A composite benchmark score is an average across multiple tasks. It answers “how capable is the model overall?” but does not directly answer “how much will it cost to complete my business task?” Between those two questions sits a key variable: how many tokens are consumed to complete the same task.
The token unit price is the smallest billing unit, but a business system pays the total cost of completing a task. A model with a lower unit price may end up with a higher bill if it has a longer reasoning chain or produces more verbose output. For model selection, evaluate both unit price and token usage per task.
2. Parameter Scale and Inference Cost
Model parameter counts usually fall into two categories.
- Total parameters: determines the storage size of model weights and affects VRAM usage and deployment requirements.
- Active parameters: in models using a mixture-of-experts architecture, this refers to the parameter scale that actually participates in computation during each forward pass. It mainly affects the compute required per token.
Parameter scale affects cost, but it does not equal price. The provider’s hardware configuration, batching and scheduling, caching strategy, and pricing strategy all change the final API unit price. Therefore, do not judge which model is cheaper based only on parameter count. Use actual quotes and actual usage as the basis.
3. Input and Output Pricing Structure
Most LLM APIs price input tokens and output tokens separately, and output unit prices are usually higher. This means that for the same total number of tokens, different input/output ratios lead to different costs.
- Tasks with long input and short output, such as long-document classification and information extraction: input unit price has a greater impact.
- Tasks with short input and long output, such as code generation and long-form writing: output unit price and output length have a greater impact.
If a model’s reasoning process is also counted as output tokens, enabling deep reasoning can significantly increase billed usage. Billing rules vary by provider; check the official documentation item by item before integration.
4. How to Calculate Per-Task Cost
Per-task cost can be calculated with the following formula:
Per-task cost = input tokens × input unit price ÷ 1,000,000 + output tokens × output unit price ÷ 1,000,000
Example code:
def task_cost(input_tokens: int, output_tokens: int,price_in: float, price_out: float) -> float:"""Calculate the cost of a single task.price_in, price_out: price per million tokens; both use the same currency unit."""return (input_tokens * price_in + output_tokens * price_out) / 1_000_000
The following hypothetical data illustrates the calculation. These values are for demonstration only and do not represent the pricing or performance of any real product.
| Item | Model A | Model B |
|---|---|---|
| Input price (CNY per million tokens) | 1 | 2 |
| Output price (CNY per million tokens) | 4 | 10 |
| Input tokens per task | 8,000 | 8,000 |
| Output tokens per task | 60,000 | 20,000 |
| Cost per task (CNY) | 0.248 | 0.216 |
Model A has lower input and output unit prices than Model B, but it consumes more output tokens per task. As a result, its final per-task cost is about 13% higher. This shows that token efficiency is a factor that cannot be ignored in cost accounting.
5. Caveats When Interpreting Evaluation Results
- A composite score is a multi-task average. Focus on the sub-task scores closest to your own business.
- Evaluation conditions affect results, such as whether deep reasoning is enabled, context length, and sampling parameters. Confirm that conditions are consistent when comparing models.
- The same score does not mean the same cost, and the same cost does not mean the same quality. Evaluate the two separately.
- Score improvements are sometimes accompanied by more output tokens. If the quality gain does not cover the additional cost, reassess the tradeoff.
6. Model Selection Checklist
- Confirm billing rules: whether reasoning tokens count as output, and whether caching or batch discounts are available.
- Measure the average and distribution of input and output tokens by business scenario, not just the mean.
- Calculate per-task cost and convert it to monthly cost for budgeting.
- Evaluate quality on a representative sample set and define quantifiable quality criteria.
- Assess latency: longer output usually means longer end-to-end response time. Confirm whether it meets business latency requirements.
- Preserve switching capability: integrate through a unified model invocation layer to support gradual rollout or rollback.
7. Build Your Own Cost Baseline
Relying directly on public benchmark conclusions for decisions carries relatively high risk. A more reliable approach is to build an internal baseline with the following steps.
- Sample a set of representative requests from real business traffic, usually no fewer than a few hundred, covering major scenarios and long-tail scenarios.
- For each request, record input tokens, output tokens, response time, and quality score.
- Calculate the mean, median, and high percentile, such as P95, of per-task cost to understand whether the cost distribution has a significant long tail.
- Compare candidate models on quality and cost using the same sample and the same evaluation criteria, and produce conclusions that can be recorded in a review document.
- After a small-traffic canary release, continuously monitor cost and quality metrics, and set alerts and rollback mechanisms for threshold breaches.
With this process, model selection conclusions can be traced back to specific data. When model versions are updated later, they can also be retested quickly instead of starting the evaluation from scratch each time.
