How Many Tokens Can One Kilowatt-Hour Generate? An Inference Cost Breakdown

    This article walks through a back-of-the-envelope model for estimating how many tokens an LLM inference service can produce per kilowatt-hour of electricity, then converts that energy figure into theoretical revenue and examines where electricity actually sits in the total cost structure. It covers key assumptions (GPU power draw, decode and prefill throughput), worked calculations with sample code, sensitivity analysis across throughput levels, the role of utilization in unit cost, and the limitations of this kind of estimation. The goal is a reusable method for reasoning about inference economics, not an evaluation of any specific model.

    1. Where the Question Starts

    Large language models are billed by the token, and behind every charge lies real compute and electricity consumption. A natural question follows: how many tokens can an inference service produce from one kilowatt-hour (kWh) of electricity? Working this out helps clarify the composition of unit costs, the headroom for price competition, and where energy consumption actually sits within total cost.

    This article does not evaluate any specific model. It only discusses a general estimation method and its implications for the market.

    2. The Estimation Model and Key Assumptions

    The calculation rests on the following assumptions:

    • Inference runs on a cluster of accelerator cards using large-batch inference, with batching sufficient to fully saturate the compute.
    • Effective whole-system power per accelerator card is 900 watts, covering the card itself plus cooling, networking, and CPU overhead in the data center. 900 W corresponds to a PUE (power usage effectiveness) of roughly 1.3.
    • Aggregate decode-phase throughput per card is estimated at 1,000 tokens/second, with a conservative range of 500 to 3,000 tokens/second.
    • The prefill phase is parallelizable, with per-card throughput of about 10,000 tokens/second, corresponding to 0.09 joules per token.

    These numbers are modeling assumptions, not measurements. All conclusions below are conditional on them.

    3. Step One: Output Tokens per kWh

    Unit conversion: 1 kWh equals 3.6 × 10^6 joules. Power in watts is joules per second, so 900 W means 900 joules consumed per second.

    A single card consumes 900 joules per second and produces 1,000 output tokens per second, so energy per output token is:

    900 ÷ 1000 = 0.9 joules/token

    Output tokens supported by one kWh:

    3,600,000 ÷ 0.9 = 4,000,000, i.e., roughly 4 million output tokens.

    Throughput is the most sensitive variable. Double the throughput and you double the output per unit of electricity. The table below shows results at different throughput levels:

    Per-card decode throughput (tokens/s) Energy per output token (joules) Output tokens per kWh
    500 1.8 2 million
    1000 0.9 4 million
    3000 0.3 12 million

    The following sample code computes these results in batch, so you can substitute your own parameters:

    1. def tokens_per_kwh(power_w, tokens_per_s):
    2. joules_per_token = power_w / tokens_per_s
    3. return 3_600_000 / joules_per_token
    4. print(tokens_per_kwh(900, 1000)) # 4000000.0
    5. print(tokens_per_kwh(900, 500)) # 2000000.0
    6. print(tokens_per_kwh(900, 3000)) # 12000000.0

    4. Step Two: Input Tokens Processed per kWh

    The input phase has much higher parallelism and significantly lower energy per token. At 0.09 joules per token per card, one kWh can process:

    3,600,000 ÷ 0.09 = 40,000,000, i.e., roughly 40 million input tokens.

    The roughly 10x energy gap between input and output matches the computational characteristics of the two phases. Output is generated autoregressively, token by token, and each step must read large amounts of model parameters and cache data, so memory bandwidth is often the bottleneck. All input tokens can be processed in parallel batches, keeping compute utilization high and per-token energy low.

    5. Step Three: Converting Electricity into Revenue

    Using example prices of $50 per million output tokens and $10 per million input tokens:

    • Pure output scenario: 4 million × 50 ÷ 1 million = $200
    • Pure input scenario: 40 million × 10 ÷ 1 million = $400

    Real traffic contains both inputs and outputs. Assuming a 3:1 input-to-output ratio, the energy per group (3 input tokens plus 1 output token) is:

    3 × 0.09 + 0.9 = 1.17 joules

    One kWh can process 3,600,000 ÷ 1.17, about 3.08 million groups. Revenue per group:

    (3 × 10 + 1 × 50) ÷ 1,000,000 = $0.00008

    So one kWh corresponds to roughly 3.08 million × 0.00008 ≈ $246 in revenue. At an assumed exchange rate of 7.2 CNY per USD, that is about 1,770 yuan.

    As throughput varies between 500 and 3,000 tokens/second, the same formula yields a revenue range of roughly $139 to $505. The code below reproduces this calculation:

    1. def blended_revenue(power_w, out_tps, in_j_per_tok=0.09,
    2. in_price=10, out_price=50):
    3. out_j = power_w / out_tps
    4. group_j = 3 * in_j_per_tok + out_j # 3 input tokens plus 1 output token
    5. groups = 3_600_000 / group_j
    6. usd_per_group = (3 * in_price + out_price) / 1_000_000
    7. return groups * usd_per_group
    8. print(round(blended_revenue(900, 1000))) # 246

    Note that this revenue figure is a theoretical ceiling, not profit. It assumes accelerators are always fully loaded and that everything is billed at list price.

    6. The Share of Electricity in Total Cost

    Take an illustrative industrial electricity price of 1 yuan per kWh (used here only for illustration; actual prices vary by region and contract). Against theoretical revenue of 1,770 yuan, the electricity cost is less than one-thousandth of revenue. Even at electricity prices several times higher, the share remains small.

    This shows that electricity is usually not the dominant component of inference cost. The larger items are typically:

    • Procurement cost of accelerators and other hardware, depreciated over their service life and allocated per hour;
    • Data center construction, networking, and operations staffing;
    • Amortized cost of model research and training;
    • Resource utilization. Below 100% utilization, effective output tokens shrink and unit cost rises accordingly.

    A complete unit cost should therefore include all expenses, with actually delivered tokens as the denominator:

    Unit cost = (electricity + hardware depreciation + operations and networking + amortized labor) ÷ actual tokens delivered

    Actual tokens delivered = nominal throughput × runtime × average utilization

    1. def cost_per_million_tokens(hourly_power_cost, hourly_hw_cost,
    2. hourly_ops_cost, tps, utilization):
    3. tokens_per_hour = tps * 3600 * utilization
    4. total_cost = hourly_power_cost + hourly_hw_cost + hourly_ops_cost
    5. return total_cost / tokens_per_hour * 1_000_000

    7. Implications for the Model Market

    Based on the estimates above, several conclusions follow.

    1. Energy only determines part of marginal cost. Prices must also cover fixed costs and leave a reasonable margin, so an energy calculation alone cannot derive a selling price.
    2. Efficiency gains reduce unit cost proportionally. Higher per-card throughput, better batch scheduling, quantization, and more efficient attention implementations all lower energy per token.
    3. Utilization is often the core of price competition. On the same hardware, raising utilization from a low to a high level typically reduces unit cost by more than any plausible swing in electricity prices. The exact magnitude needs to be measured in practice.
    4. The difference between closed-source and open-source lies mainly in business model. The per-token energy calculation applies to all deployment approaches. Judging the prospects of a service also requires considering user scale, distribution channels, service quality, and the ability to sustain investment.
    5. A single calculation is not enough to predict the fate of any product category. The energy-to-price conversion is a useful reference for cost structure, but it cannot by itself prove that a given category of product will fail.

    8. How to Apply This to Your Own Cost Estimates

    Substitute your own parameters using the following steps:

    1. Power: read actual accelerator power from your monitoring system and add data center overhead. Do not rely on nameplate values.
    2. Throughput: benchmark with your own workloads, covering realistic input lengths, output lengths, and batch sizes. Throughput is sensitive to all three.
    3. Utilization: measure actual load over a period of time rather than estimating from peak capacity.
    4. Cost: depreciate hardware purchase price over its service life, convert to an hourly cost, and add electricity, operations, and labor.
    5. Calculate: use the formula from the previous section to get cost per million tokens, then compare against your own pricing.

    9. Limitations

    • Batch size determines throughput. With small-batch inference, energy per token rises noticeably.
    • The longer the context, the greater the attention computation and cache footprint, changing per-token energy.
    • Models with long reasoning processes generate many intermediate tokens that are never shown to the user. These tokens still consume electricity, and if billing includes them, the real cost per answer is higher than an estimate based only on visible text.
    • Cache hit rates, quantization precision, and multi-tenant scheduling policies all affect the final result.
    • The power, throughput, and price figures in this article are assumptions and may differ substantially from real systems. For actual decisions, rely on measured data.