The Correct Way to Calculate Per-Task Cost for Large Language Models

    A public benchmark recently showed a 750B-parameter model with roughly 40B active parameters per inference matching a 2.8T-parameter model with about 104B active parameters on a composite intelligence index. It is tempting to call that a decisive cost win, but the bill tells a more restrained story. This article breaks cost down into three independent variables—capability, token efficiency, and token pricing—shows why a much lower unit price can still yield only a modest total saving, and offers a reusable per-task cost function along with an engineering optimization checklist and scenario-based selection advice.

    1. The Setup: Matching Scores, Unequal Bills

    A recent public benchmark produced an interesting result: a model with roughly 750B total parameters and about 40B active parameters per inference matched a model with roughly 2.8T total parameters and about 104B active parameters on a composite intelligence index. The smaller model’s gain came from continued optimization during post-training, not from a rewrite of the base architecture.

    The first reaction for many people is “overwhelming value for money.” Run the numbers on the bill, though, and the conclusion needs to be far more measured.

    The reason is simple: benchmark scores measure how well a model answers, while the bill settles how many tokens were burned in total. These two dimensions are not equivalent. Ignore the second one and model selection turns into an illusion driven by unit price alone.

    2. Separate the Metrics: Three Independent Variables

    Any cost discussion has to keep three things apart:

    1. Capability metrics: aggregate scores such as a composite intelligence index, reflecting average performance across tasks.
    2. Efficiency metrics: average inference tokens per task (thinking tokens plus output tokens).
    3. Price metrics: input and output token unit prices.

    Every “value for money” conclusion is a function of all three. Talk about only one of them and the conclusion is guaranteed to be distorted.

    3. Why a Lower Unit Price Buys Only a Small Total Saving

    Assume two options with the following prices and token volumes (illustrative numbers, used to demonstrate the calculation):

    • Option A: input at 1.40 per million tokens, output at 4.40 per million tokens, 41K tokens per task
    • Option B: input at 3.00 per million tokens, output at 15.00 per million tokens, 25K tokens per task

    Using the common 30% input / 70% output split, Option A costs about 0.68 per task and Option B about 0.84. A is only about 19% cheaper, even though the unit prices look several times apart.

    The key takeaway: total cost ≈ unit price × token volume. When token volume differs by more than 60%, it eats up most of the unit-price advantage. This is exactly why “inference token efficiency” has been underestimated for so long.

    4. A Reusable Calculation Method

    Teams should turn the cost model into a small function and run it before adopting any new model:

    1. def task_cost(input_price, output_price,
    2. in_tok, out_tok, think_tok=0):
    3. """Per-task cost estimate; prices are in USD per million tokens"""
    4. total_out = out_tok + think_tok
    5. return (in_tok * input_price + total_out * output_price) / 1_000_000
    6. # Example: thinking tokens are counted on the output side
    7. cost_a = task_cost(1.40, 4.40, 12_000, 29_000)
    8. cost_b = task_cost(3.00, 15.00, 7_500, 18_000)
    9. print(cost_a, cost_b)

    Three fields should be recorded alongside it: task success rate, average number of retries, and average token volume. Without the success rate, cost gets quietly inflated by failed runs that have to be repeated.

    5. Why Token Efficiency Varies: Post-Training Trade-Offs

    Post-training can raise capability substantially, but the optimization target is usually “get the answer right,” not “say less.” Three side effects follow:

    • Longer chains of thought: to reduce the error rate on hard problems, the model tends to reason through several extra rounds.
    • Redundant output: explanatory content expands, which is especially wasteful in structured scenarios.
    • Insufficient early stopping: simple tasks still go through the full reasoning pipeline.

    This also explains another pattern: a small model whose intelligence index is already close to the previous generation of large models, yet whose token consumption is wildly high. Capability went up, and so did the word count.

    6. Engineering Optimization Checklist

    • Tiered routing: send simple requests to a small model with short reasoning, and escalate only the hard ones.
    • Thinking budget: cap reasoning length, and degrade or fall back to rule-based handling when the cap is exceeded.
    • Prompt constraints: state requirements explicitly, such as “output JSON only” or “no more than N words,” to cut down on useless output.
    • Caching and reuse: prefix caching, semantic caching, and batching requests together.
    • Observability: build a monitoring and alerting dashboard for token volume, success rate, and per-task cost.
    • Elastic capacity: use a container platform for elastic scaling, a message queue to smooth out traffic peaks, object storage to accumulate samples, and a logging service for full-chain tracing.

    7. Selection Advice: Choose by Scenario, Not by Leaderboard

    • High concurrency, short output, fixed format: prioritize token efficiency and latency.
    • Long-document reasoning and complex code: prioritize capability, but set a thinking budget.
    • Cost-sensitive products: use “per-task cost plus success rate” as the single north star metric.
    • Private deployment or data-sensitive scenarios: look at general-purpose options that can be deployed in your own environment, combined with general-purpose cloud product categories.

    8. Conclusion

    Leaderboard scores decide whether a model is usable; token efficiency decides whether you can afford to use it. Make per-task cost, success rate, and token volume a standing dashboard, and only then talk about value for money—otherwise the unit price number will mislead you.