How Many Tokens Can One Kilowatt-Hour Generate? Estimating LLM Inference Energy Costs

    This article walks through a simple framework for estimating how many tokens a large language model can generate per kilowatt-hour of electricity. It covers the core conversion formula, key assumptions such as accelerator power draw and data center PUE, the energy difference between decoding and prefill, and a rough revenue ceiling per kWh. It also discusses why energy is only one part of total cost and what the numbers imply for inference pricing and market dynamics. A Python script is included so readers can plug in their own parameters.

    1. From Energy to Tokens: The Basic Conversion Logic

    The basic unit of LLM inference is the token. To convert electricity into tokens, the core formula is simple: the energy per token equals effective power consumption divided by the number of tokens output per second.

    Two unit conversions matter here. First, one kilowatt-hour (kWh) equals 3.6×10⁶ joules. Second, power is measured per second, so dividing “joules/second” by “tokens/second” gives “joules/token.” Combining these two steps yields the number of tokens per kilowatt-hour.

    2. Key Assumptions and Parameters

    Estimation requires fixing the parameters first. The table below lists the values used in this article. All figures are estimation assumptions, not measured results from any specific system.

    Parameter Value Notes
    Single accelerator power draw ~700 W Typical TDP of accelerators commonly used in data centers
    Data center PUE ~1.3 Includes cooling, networking, CPU, and other overhead
    Effective power per accelerator ~900 W Single-card power multiplied by PUE, rounded
    Aggregate output speed under large-batch inference ~1,000 tokens/sec Reasonable range: roughly 500–3,000 tokens/sec
    Prefill (input processing) throughput ~10,000 tokens/sec Input processing is highly parallel, so throughput is far higher than output
    Energy per prefill token ~0.09 J Derived from 900 W divided by 10,000 tokens/sec

    Among these, the output speed under large-batch inference has the biggest impact on the result. It depends on model size, batching strategy, context length, and hardware generation, and real-world variation can be substantial.

    3. Energy per Output Token vs. Input Token

    On the output side (decoding), the energy per token is: 900 J/sec ÷ 1,000 tokens/sec = 0.9 J/token.

    The number of output tokens per kWh is: 3.6×10⁶ ÷ 0.9 = 4 million tokens.

    On the input side (prefill), the energy per token is 0.09 J, so one kWh can process: 3.6×10⁶ ÷ 0.09 = 40 million input tokens.

    The tenfold difference comes from the nature of decoding: tokens must be generated one at a time, with each step depending on the previous one, making parallelization difficult. Prefill, by contrast, can process an entire input sequence in parallel, making it far more compute-efficient. This asymmetry also explains why most providers charge significantly more for output than for input.

    The following code demonstrates the calculation so readers can substitute their own parameters and verify the results.

    1. def tokens_per_kwh(effective_power_w: float, tokens_per_sec: float) -> float:
    2. """Estimate the number of output tokens generated per kWh."""
    3. joules_per_token = effective_power_w / tokens_per_sec
    4. return 3.6e6 / joules_per_token
    5. def revenue_per_kwh(in_ratio=3, out_ratio=1,
    6. prefill_j=0.09, decode_j=0.9,
    7. in_price=10, out_price=50) -> float:
    8. """Compute the revenue ceiling per kWh using a mixed input/output ratio.
    9. Prices are in USD per million tokens.
    10. """
    11. group_energy_j = in_ratio * prefill_j + out_ratio * decode_j
    12. groups_per_kwh = 3.6e6 / group_energy_j
    13. group_revenue = (in_ratio * in_price + out_ratio * out_price) / 1e6
    14. return groups_per_kwh * group_revenue
    15. print(tokens_per_kwh(900, 1000)) # ~4,000,000 output tokens
    16. print(round(revenue_per_kwh(), 1)) # ~246.2 USD

    4. Translating Energy into a Revenue Ceiling

    Using the example prices, the output side corresponds to roughly $200 per kWh, and the input side to roughly $400 per kWh.

    In practice, input and output are usually billed together. With a 3:1 input-to-output ratio, the revenue per kWh is about $246.

    Uncertainty in throughput directly scales the result. Assuming prefill throughput and decode speed vary proportionally: at 500 tokens/sec output speed, revenue is about $123 per kWh; at 3,000 tokens/sec, it is about $738 per kWh. So a reasonable range is roughly $100–$800 per kWh.

    It is important to stress that this is a theoretical revenue ceiling — the result if hardware runs at full utilization and every token is billed. It is not profit.

    5. Energy Is Not the Whole Cost Story

    Electricity’s share of total cost depends on hardware utilization and operational efficiency. At an industrial electricity price of roughly $0.07 per kWh, the power bill is only a small fraction of the revenue generated per kWh. This means the unit economics of tokens are driven mainly by other factors.

    The major cost items include:

    • Hardware depreciation: The purchase cost of accelerators must be amortized over their useful life.
    • Facilities and operations: Data center space, networking, staffing, and maintenance are fixed costs.
    • Utilization: Fixed costs must be spread across the tokens actually generated. If utilization drops by half, the fixed cost per token roughly doubles.

    As a result, improving per-accelerator throughput, optimizing batching, and reducing idle time usually improve unit cost far more than negotiating cheaper electricity. Common general-purpose techniques include model quantization, continuous batching, speculative decoding, and prefix caching.

    6. Implications for the Market

    1. Inference efficiency sets the price floor. The cost per token is determined jointly by hardware throughput and energy consumption. Providers who want to keep cutting prices must rely on efficiency gains, not subsidies alone. The wider the efficiency gap between vendors, the wider the gap in their ability to withstand price wars.

    2. Asymmetric input/output pricing is here to stay. The serial nature of decoding makes output inherently more expensive. This means applications built around long-form generation have a fundamentally different cost structure from those built around long-context understanding.

    3. Long contexts and agent workloads will raise the input share. When applications repeatedly carry large contexts or tool results, the proportion of input tokens rises. In that scenario, cache reuse capability becomes a key cost driver.

    4. Energy and infrastructure become long-term variables. Data center efficiency, siting, and electricity prices directly affect a provider’s unit cost. As inference demand grows, the ability to build out compute infrastructure will become a competitive factor.

    5. Enterprise users should track unit costs. When procuring model services, enterprises should break down input and output tokens by workload, estimate costs separately, and continuously monitor average token consumption per request to keep budgets under control.

    7. Limitations of This Estimate

    The results in this article rest on a set of assumptions. Keep the following in mind:

    1. All parameters are estimates and have not been validated against measurements from any specific system.
    2. Model size, context length, batch size, and hardware generation can all significantly change the outcome.
    3. The example prices are for illustration only and do not reflect any provider’s actual pricing.
    4. Exchange rates and electricity prices change over time; recalculate with current data.

    For real-world decisions, replace the parameters above with your own workload data and rerun the same calculations.