From Electricity to Price: The Economics of LLM Token Costs

    This article traces the cost of large language model (LLM) tokens back to electricity and hardware utilization. It explains why output tokens cost more than input tokens, shows how to estimate output tokens per kilowatt-hour with a simple energy model, and outlines how these costs shape pricing, open-source business models, and self-hosting decisions.

    1. Background: Cost Becomes the Focus as Capabilities Converge

    The gap between LLMs on general question answering, code generation, and text understanding is narrowing. Leaderboard rankings change quickly, but in most business scenarios, two models perform only slightly differently in practice. When capabilities are close, buyers care about two things: how much a given task costs, and whether the service is stable and controllable.

    In this context, the token becomes the main unit of measurement. It works like electricity or data traffic: you pay for what you use. Its price depends on the underlying resource cost, service efficiency, and market competition. Understanding the cost structure of tokens is the first step in judging whether a model’s price is reasonable and in deciding whether to self-host or call an API.

    2. Where Token Costs Come From

    2.1 Inference has two stages

    LLM inference typically has two stages: prefill and decode. During prefill, the model processes all input tokens at once. This stage parallelizes well, has high compute density, and delivers much higher throughput than decode. During decode, the model generates output tokens one at a time. Each token requires reading the model weights and the cached history, which is limited by memory bandwidth. As a result, decode is slower.

    For this reason, output tokens usually cost more than input tokens. The price gap reflects the hardware efficiency difference between the two stages.

    2.2 Energy is the most basic cost

    In a data center, the electricity for compute devices, cooling, and networking are measurable hardware costs. Three parameters are needed for an estimate:

    1. Effective power per card: the rated power of the accelerator multiplied by the data center’s Power Usage Effectiveness (PUE). A PUE closer to 1 means less overhead from cooling and power distribution.
    2. Output throughput: the number of output tokens a single card generates per second during batch inference. This depends on model size, batch size, context length, and scheduling strategy, and it varies widely.
    3. Electricity price: the cost of each kilowatt-hour purchased.

    Energy per output token is calculated as:

    Energy per output token (joules) = Effective power per card (watts) ÷ Output throughput (tokens per second)

    Since 1 kilowatt-hour equals 3.6 million joules, the number of output tokens generated per kilowatt-hour is 3.6 million ÷ energy per token.

    2.3 Worked example

    Assume a card draws 700 watts, the PUE is 1.3, and batch inference produces 1,000 output tokens per second. Then:

    • Effective power = 700 × 1.3 = 910 watts
    • Energy per token = 910 ÷ 1,000 = 0.91 joules per token
    • Output tokens per kWh ≈ 3,600,000 ÷ 0.91 ≈ 3.96 million

    These figures are assumptions for estimating orders of magnitude. Actual throughput depends on the specific model and deployment. Use your own benchmark results.

    The following script lets you change the parameters and recalculate:

    1. def output_tokens_per_kwh(card_power_w, pue, output_tps):
    2. """Output tokens generated per kWh, estimated from effective power"""
    3. joules_per_token = card_power_w * pue / output_tps
    4. return 3.6e6 / joules_per_token
    5. def revenue_per_kwh(tokens, price_per_million):
    6. """Revenue per kWh, based on the price per million tokens"""
    7. return tokens / 1e6 * price_per_million
    8. tokens = output_tokens_per_kwh(card_power_w=700, pue=1.3, output_tps=1000)
    9. print(f"Output tokens per kWh (x10,000): {tokens/1e4:.0f}") # approx. 396
    10. print(f"Revenue at USD 50 per million tokens: {revenue_per_kwh(tokens, 50):.0f}") # approx. 198

    3. From Energy to Price: The Economics of One kWh

    3.1 Output tokens only

    Using a price of USD 50 per million output tokens, the output revenue from one kilowatt-hour is about 3.96 million ÷ 1 million × 50 ≈ USD 198.

    Throughput is the most sensitive variable. If throughput ranges from 500 to 3,000 tokens per second, the output revenue from one kilowatt-hour falls between about USD 99 and USD 593. This means the profit margin of an inference service depends heavily on batch scheduling and GPU memory utilization, not just on hardware specifications.

    3.2 Mixed input and output pricing

    In real workloads, input tokens usually far outnumber output tokens. Consider a 3:1 ratio of input to output tokens, with input priced at USD 10 per million tokens and output at USD 50 per million tokens. The calculation proceeds as follows:

    • Energy for each group of 4 tokens (3 input, 1 output): assuming 0.09 joules per input token, 3 × 0.09 + 0.91 = 1.18 joules
    • Groups processed per kWh: 3,600,000 ÷ 1.18 ≈ 3.05 million
    • Revenue per group: (3 × 10 + 50) ÷ 1,000,000 = USD 0.00008
    • Mixed revenue per kWh: 3.05 million × 0.00008 ≈ USD 244

    This result is a rough model. It excludes hardware depreciation, labor, network bandwidth, storage, idle time, and differences in electricity prices. Its value lies in showing the order of magnitude and whether electricity is a large or small share of total cost.

    3.3 Electricity is not the whole cost

    Electricity’s share of total inference cost depends on how hardware purchase costs are amortized. Over a depreciation period of several years, hardware costs often exceed electricity costs. For this reason, raising equipment utilization, meaning keeping the service busy with requests, usually does more to reduce unit cost than lowering the electricity price.

    4. Effects on Pricing and Business Models

    4.1 Downward price pressure

    When several models perform similarly on general tasks, price competition intensifies. Providers can maintain margins only by lowering unit costs, raising throughput, or offering differentiated capabilities. For buyers, the range of options grows. However, switching models and validating their output also adds engineering cost.

    4.2 Competition for closed-source services

    Revenue from closed-source services comes mainly from pay-per-use calls. Their advantages include a consistent operating experience, stable interfaces, and ongoing model improvements. As pricing becomes more transparent, providers need to justify a premium through availability, security and compliance, and long-term capability upgrades.

    4.3 Revenue paths for open-source models

    Open-source models are not sold directly, but their commercial value can be realized through several paths:

    1. Managed inference services: deploying and operating inference clusters for users, billed by usage or by resources.
    2. Private deployment: delivering models in a customer’s data center or a dedicated cloud environment, with fees for implementation and services.
    3. Domain tuning: fine-tuning and evaluating models on customer data to deliver measurable business results.
    4. Operations and security add-ons: monitoring and alerting, log auditing, and version management.

    Private deployment keeps data within the customer’s domain, keeps costs predictable, and allows customization. For industries with sensitive data, these factors often matter more than the unit price.

    5. Enterprise Selection and Cost Planning

    5.1 Build a shared evaluation framework

    Do not select a model based only on leaderboard scores. Build an evaluation table around these dimensions:

    • Task quality: accuracy, refusal rate, and hallucination rate on your own datasets.
    • Unit cost: input and output tokens per 1,000 requests, and total spend.
    • Latency and throughput: time to first token, average generation speed, and queueing during peak hours.
    • Compliance and control: data retention policies, deployment location, and audit capabilities.

    5.2 Break-even between self-hosting and API calls

    Self-hosting a inference cluster has high fixed costs, so it only pays off when request volume is stable and large. You can estimate the break-even point with these formulas:

    Monthly self-hosting cost = Hardware depreciation + Electricity + Operations labor
    Monthly API cost = Total tokens requested per month × Unit price

    If monthly API cost consistently exceeds monthly self-hosting cost, and utilization can stay high, self-hosting is more economical.

    5.3 Common mistakes

    • Treating peak throughput as average throughput and ignoring idle time.
    • Comparing only unit prices, not the number of tokens needed to complete the same task.
    • Ignoring how context length increases cost. Long contexts significantly raise the compute required for prefill and the memory used.

    6. Limitations and Caveats

    This article’s estimates rely on simplified assumptions: fixed power draw, stable throughput, and linear energy use. In real systems, changes in batch size, fluctuating concurrency, network bottlenecks, and cold starts all affect the results.

    Benchmark scores also reflect performance on specific task sets, which may not match business outcomes. Base model selection on your own data and workloads, not on a single ranking.

    Token costs trace back to electricity and hardware utilization. Following this chain of reasoning helps readers judge model pricing, deployment options, and business opportunities more clearly.