LLM Cost Evaluation: Choosing Models by Cost per Task, Not Token Price
Token prices alone do not reveal an LLM’s cost-effectiveness. This article explains how to evaluate models using workload token profiles, caching, reasoning effort, output efficiency, and context-length pricing. It also outlines a repeatable evaluation process for comparing task quality and cost, estimating budgets, and validating performance under real traffic.
1. Lower Token Prices Do Not Necessarily Mean Lower Bills
A common mistake in LLM selection is treating the price per million tokens as the final measure of cost. A 50% reduction in input pricing may look attractive, but its impact on the total bill depends on the workload’s input and output volumes, their respective prices, and caching behavior.
For input-heavy, output-light workloads such as long-document summarization and codebase understanding, input pricing matters—but output pricing and output length still need to be included in the calculation. For output-intensive workloads such as generative writing or structured extraction, reductions in output pricing are especially important.
The first step is therefore not to compare price lists, but to define your workload’s token profile:
- The average ratio of input tokens to output tokens per request.
- The share of repeated prefixes in multi-turn conversations, which determines potential caching savings.
- Whether the workload requires a high reasoning-effort setting.
- Whether the context window can accommodate the longest business inputs.
Price comparisons become meaningful only after these four factors are quantified.
2. The Variables Behind Cost per Task
A practical cost approximation separates uncached input, cached input, and output tokens, including any additional billable output tokens generated during reasoning:
Cost per task =Uncached input tokens × Input price+ Cached input tokens × Cached-input price+ Output tokens × Output price+ Additional reasoning tokens × Output price
Input tokens must be divided into cached and uncached portions rather than counted again as a separate total. When prices are quoted per million tokens, divide the result by 1,000,000.
Cached-input pricing can be roughly one-tenth to one-twentieth of standard input pricing. This makes caching an important cost lever for applications with long system prompts or fixed knowledge-base prefixes.
The following function illustrates the calculation:
def task_cost(in_tok, out_tok, cache_hit_ratio=0.0,price_in=1.0, price_out=5.0, price_cache=0.05):"""Return cost per task in USD using prices per million tokens."""cached = in_tok * cache_hit_ratiofresh = in_tok - cachedreturn (fresh * price_in + cached * price_cache+ out_tok * price_out) / 1_000_000
For this function, out_tok should include any reasoning tokens billed at the output rate. The default prices are illustrative, not a current provider price list.
Applying the function to your actual workload distribution provides a more realistic spending estimate than comparing token prices alone.
3. Compare Models on Two Axes: Quality and Cost per Task
A useful comparison separates capability from cost:
- Vertical axis: A public composite intelligence index as an indicator of general model capability.
- Horizontal axis: Average cost per task across a fixed evaluation set.
Cost per task is more informative than token price because it also captures output-token efficiency: how many tokens a model needs to complete the same task.
An illustrative comparison might show that a mid-tier model at its default reasoning setting performs slightly below a flagship model while costing more than 40% less per task. On some reasoning-intensive tasks, the flagship model may also be more expensive.
These comparisons highlight why model tier, reasoning settings, and task type must be evaluated together. A single pricing comparison cannot determine the best choice for every workload.
4. Reasoning Effort Is a Cost Lever
Many models offer multiple reasoning-effort settings. Increasing reasoning effort can generate more tokens during the reasoning stage and raise costs, but it may also substantially improve accuracy on complex tasks.
Treat reasoning effort as an adjustable control rather than a fixed configuration:
- Run the same evaluation set at low, medium, and high reasoning effort.
- Record accuracy and cost per task at each setting.
- Plot the quality–cost curve and use its knee point as the default setting.
- Increase reasoning effort dynamically only for difficult requests.
For some tasks, a mid-tier model at high reasoning effort can match a flagship model at its default setting while retaining a lower cost per task. This is an important area for cost optimization.
5. Output Efficiency and Throughput Are Different Metrics
Output-token efficiency should not be confused with generation speed.
Output-token efficiency measures how few tokens a model uses to complete the same task. It directly affects the bill.
Generation speed includes tokens generated per second and time to first token. It affects user experience and concurrency capacity.
The two can diverge: a model may use fewer tokens but generate them more slowly. Track them separately in engineering requirements, using token efficiency for cost accounting and speed metrics for latency targets and capacity planning.
6. Context Limits and Hidden Costs
Low advertised prices may come with conditions. A rate may apply only below a particular input-context threshold, while longer contexts use a different pricing tier.
Before selecting a model, check:
- How billing changes when the context exceeds the threshold.
- The GPU memory and latency overhead associated with long contexts.
- Whether task quality degrades on very long inputs.
Ignoring these constraints can reverse an apparent cost advantage under production traffic.
7. Build a Repeatable Evaluation Process
Use a consistent process that can be rerun as models, prices, and workloads change:
- Build an evaluation set: Sample 200–500 requests from real workloads, covering both typical cases and edge cases.
- Standardize test conditions: Keep prompts, temperature, and maximum output limits consistent to avoid misleading comparisons.
- Record quality and token usage: Save both the task-quality score and token consumption for every run.
- Calculate costs: Apply the cost function to the actual workload distribution and translate the results into a monthly budget.
- Validate with limited production traffic: Use logging, monitoring, and alerts to observe actual token usage and latency.
- Reevaluate regularly: Quarterly reviews provide a practical cadence because models and prices can change.
If your organization already uses cloud container platforms, object storage, and logging or monitoring services, you can containerize the evaluation and cost-accounting scripts and run them on a schedule. Store the results as historical data so that changes remain comparable over time.
8. Common Mistakes and the Main Takeaway
Three frequent mistakes undermine LLM cost comparisons:
- Looking only at input-token prices.
- Ignoring caching savings.
- Treating reasoning effort as a constant.
Cost-effectiveness is not an inherent property of a model. It depends on the combination of model capability, workload token profile, reasoning effort, and billing constraints.
Build your own evaluation set and cost model, then make decisions using cost per task rather than token price alone. This provides a verifiable, reproducible basis for balancing task quality against budget.
