LLM Inference Energy Cost: How Many Tokens Can One kWh Produce?

    This article breaks down the energy economics of large language model inference, using a reproducible model to estimate how many tokens a single kilowatt-hour can generate. It separates prefill and decode workloads, converts throughput and power assumptions into per-token energy and revenue ranges, and ranks the key sensitivity factors. Readers will learn why effective throughput matters more than electricity price, along with practical optimization paths such as prefix caching, continuous batching, speculative decoding, quantization, tiered routing, and elastic scaling.

    1. Why “Tokens per kWh” Is Worth Calculating

    As model capabilities converge and benchmark gaps narrow, the ability to scale LLM services often depends less on a single evaluation score than on whether the unit economics hold up. One intuitive but rarely calculated metric is how many tokens a single kilowatt-hour (kWh) can produce. It compresses electricity cost, compute utilization, throughput scheduling, and pricing strategy into the same dimension, making it useful for both capacity planning and gross margin estimation.

    This number is not a physical constant. It is an engineering estimate that depends on assumptions. The following sections provide a reproducible derivation and explain how sensitive the result is to each assumption.

    2. Base Model: From Power Draw to Energy per Token

    The starting point is effective power consumption, not the chip’s rated power. For an accelerator card rated at around 700W, cooling, power delivery losses, and network and scheduling node overhead are typically captured by PUE. At a PUE of 1.3, effective power consumption is about 900W, or 900 joules per second.

    The second variable is aggregate output throughput per card. For large-batch online inference, a conservative output rate is 1,000 tokens/second (with a reasonable range of 500–3,000). Dividing the two gives the decode-stage energy consumption:

    1. def decode_energy_j_per_token(card_watt=900, tps=1000):
    2. return card_watt / tps # 0.9 J/token
    3. KWH = 3_600_000 # 1 kWh = 3.6 million joules
    4. print(KWH / decode_energy_j_per_token()) # ≈ 4 million tokens/kWh

    Result: in the decode stage, one kWh corresponds to roughly 4 million output tokens.

    3. Prefill vs. Decode: Two Stages Cannot Be Mixed

    Applying the same method to the input side produces a completely different order of magnitude. Prefill is a highly parallel matrix operation with high computational density and good parallelism. Single-card throughput can reach about 10,000 tokens/second, or 0.09 joules/token, meaning one kWh can process about 40 million input tokens.

    This explains a common mistake: using the output-side unit price to estimate overall cost leads to a severe overestimate. A real inference request contains both stages of computation, and the two are constrained by different bottlenecks. Prefill is limited by compute and memory bandwidth, while decode is limited by memory capacity and bandwidth. Batch size, context length, and concurrency all change the actual ratio.

    4. Revenue per kWh: From Electricity Cost to Income

    Using a common mid-to-high-end pricing range (about $50 per million output tokens and $10 per million input tokens) for illustration:

    • Output side: 4 million × $50/million ≈ $200/kWh
    • Input side: 40 million × $10/million ≈ $400/kWh
    • Mixed at a typical 3:1 input-to-output ratio: about $250–300/kWh (roughly CNY 1,800–2,200)

    If the throughput assumption is relaxed to 500–3,000 tokens/second, the reasonable range falls between $100–800/kWh (about CNY 700–6,000). The span is close to an order of magnitude, showing that throughput utilization, not electricity price, is the dominant variable in the cost model.

    5. Sensitivity Analysis: Which Assumption to Watch

    Ranked by impact, the priority is roughly:

    1. Effective throughput per card (batch size, context length, parallelism strategy), which can cause several-fold differences;
    2. Input-to-output ratio, which directly determines the share of high-priced output;
    3. PUE and effective power consumption, typically causing 20%–40% variation;
    4. Electricity price, which has the smallest impact in most scenarios unless deployed in regions with extreme price differences.

    The engineering implication is clear: optimization should focus on improving effective throughput and cache hit rate, not on cutting electricity costs.

    6. Actionable Optimization Paths

    • Prefix cache reuse: cache repeated prefixes such as system prompts and long documents to directly reduce prefill energy consumption;
    • Continuous batching and dynamic batching: increase decode-stage parallelism and minimize GPU idle time;
    • Speculative decoding and quantization: reduce computation per token within an acceptable accuracy range;
    • Tiered routing: send short requests to smaller models and long-context or complex reasoning to larger models;
    • Elastic scaling and hybrid deployment: use common cloud capabilities such as container platforms, message queues, logging services, and monitoring alerts to schedule compute according to load curves and avoid idle consumption during low-traffic periods.

    7. Conclusion

    About 4 million output tokens per kWh is a useful anchor, but its value lies in providing a decomposable and verifiable method: effective power consumption ÷ throughput per card = energy per token. Adding input-output structure and pricing assumptions yields a unit economics range. Once this model is connected to your own monitoring data, teams can replace guesswork with real throughput, making compute procurement and pricing decisions based on reproducible numbers.