How to Estimate Energy Consumption and Cost per Token for Large Language Models
This article presents a reusable framework for estimating how many tokens a large language model can produce per kilowatt-hour and how that translates into API pricing. It covers defining effective power draw with PUE, building a per-token energy model for output and input workloads, converting energy figures into revenue per kWh under different pricing and load mixes, and a sensitivity analysis of the assumptions that matter most. It closes with neutral observations on market dynamics and a practical optimization checklist.
1. Why “Tokens per Kilowatt-Hour” Deserves a Real Calculation
As model capabilities converge and competition shifts from benchmark scores to usable capability per unit of cost, energy consumption and cost are becoming core metrics for the sustainability of inference services. The original discussion starts from a simple question: how many tokens can one kilowatt-hour produce? The question looks purely engineering-oriented, but it actually pulls on three threads: compute procurement and cluster utilization, data center power and cooling overhead, and the reasonableness of final API pricing.
It is worth stressing that there is no single correct answer to this kind of estimate. It depends heavily on model size, parallelism strategy, batching efficiency, context length, input-to-output ratio, quantization scheme, and data center conditions. So the more professional approach is not to memorize a number, but to master a reusable estimation framework and to make the sensitivity range of each assumption explicit.
2. Step One: Build a Per-Token Energy Model
2.1 Defining Effective Power
The starting point is effective power draw, not the nominal power rating of the chip. Take a common high-power accelerator card as an example: per-card power is on the order of 700W. Once cooling, networking, storage, CPU, and power conversion losses are added, data center power usage effectiveness (PUE) is typically estimated at 1.2–1.4. Taking the midpoint of 1.3, effective power per card can be counted as roughly 900W.
Here is a detail that is often overlooked: PUE is a facility-level metric and cannot be multiplied onto a single card and then treated as chip power. But when finer-grained data is unavailable, using “per-card power × PUE” as a first-order approximation is an acceptable engineering compromise.
2.2 Throughput Assumptions and the Energy Formula
In large-batch inference scenarios, aggregate output speed per card is conservatively taken as 1000 token/s, with a reasonable range of 500–3000. So:
Energy per token = effective power / output throughput= 900 J/s ÷ 1000 token/s= 0.9 J/tokenOne kWh = 3.6e6 JOutput tokens per kWh ≈ 3.6e6 / 0.9 ≈ 4.0e6 tokens
If throughput drops to 500 token/s, energy doubles to 1.8 J/token and output per kWh falls to about 2 million tokens. If throughput rises to 3000 token/s, energy drops to 0.3 J/token and output per kWh climbs to about 12 million tokens. Throughput is clearly the largest variable.
2.3 Why the Input Side Is Different
The prefill stage is a highly parallel matrix operation with significantly higher compute utilization than token-by-token decoding. Aggregate input throughput per card can reach roughly 10,000 token/s, corresponding to about 0.09 J/token and about 40 million input tokens processed per kWh.
The engineering implication is direct: for long-context, input-heavy workloads, one unit of electricity can “digest” far more tokens than for output-only workloads. The output stage, constrained by memory bandwidth and the serial nature of decoding, is the real cost bottleneck.
3. Step Two: Converting Energy into Selling Price
3.1 Output Side
At an output price of USD 50 per million tokens: 4 million tokens × 50 / 1e6 ≈ USD 200 per kWh.
3.2 Input Side
At an input price of USD 10 per million tokens: 40 million tokens × 10 / 1e6 ≈ USD 400 per kWh.
3.3 Mixed Workloads
Weighted by a typical 3:1 input-to-output ratio, the combined figure is roughly USD 250–300 per kWh, or about CNY 1,800–2,200 per kWh. Given throughput uncertainty, a reasonable range can be widened to USD 100–800 per kWh.
Blended price ≈ (3 × input side + 1 × output side) / 4≈ (3 × 400 + 200) / 4 = USD 350 per kWh (before utilization discount)
In practice you also multiply by cluster utilization and by losses from queuing and failed retries, so USD 250–300 per kWh is closer to a production environment.
4. Sensitivity Analysis: Which Assumptions Deserve the Most Scrutiny
- Throughput assumptions: most affected by batch size, sequence length, and parallel partitioning; variation can span several times.
- PUE: older facilities above 1.5 will raise costs significantly.
- Input-to-output ratio: agent-style workloads are input-heavy and have a completely different cost structure.
- Utilization: offline batch processing can approach full load, while online off-peak periods may fall below 30%.
- Quantization and sparsification: these can reduce bandwidth pressure but introduce accuracy and implementation complexity.
5. Three Neutral Observations on Market Structure
First, competition is shifting from “topping the capability rankings” to “stable usability per unit of cost,” making energy consumption and throughput first-class metrics. Second, pricing will differentiate more finely between input and output, and between long-context and short requests, with blended billing becoming more common. Third, engineering optimizations (continuous batching, paged memory management, prefix caching, distillation, and quantization) will directly change unit economics, increasing the influence of the technical side.
6. A Practical Optimization Checklist
- Improve batching efficiency and memory utilization, and reduce idle cycles in the decoding stage;
- Enable caching for repeated prefixes to cut redundant prefill overhead;
- Schedule in tiers by input-to-output ratio, isolating long-input workloads from low-latency workloads;
- Set up monitoring, alerting, and logging services to continuously collect energy consumption and cost per 10,000 tokens;
- Do elastic scaling on a container platform, use object storage for cold data, and use message queues to smooth out peaks.
7. Conclusion
The value of “how many tokens per kilowatt-hour” lies not in any specific number, but in the fact that it forces you to put the model, hardware, facility, and pricing into the same table and account for them together. With this framework in hand, whether you build your own inference cluster or purchase general-purpose compute and model services in the cloud, you can judge more quickly whether costs are reasonable and whether an optimization is actually effective.
