Token Pricing Economics: The Cost of Training, Inference, and Profit Margins

    This article explains how token-based pricing works, why output tokens typically cost more than input tokens, and how training, inference, research, and safety investments contribute to the overall cost structure of large language model services. It also provides an illustrative calculation of per-token costs, revenue, and gross margin.

    1. What Are Tokens, and Why Does Output Cost More?

    A token is the billing unit used by large language models to process text. It is neither exactly one character nor exactly one word. Instead, it is a segment of text produced by a tokenizer. In English, a common word is often represented by one token. In Chinese, one character may commonly correspond to one or two tokens, depending on the tokenizer.

    For billing purposes, input tokens—the prompt sent by the user—and output tokens—the response generated by the model—are counted separately. Their prices are usually different, and the price of output tokens is often several times higher than that of input tokens.

    1. # Illustrative pseudocode
    2. cost = (input_tokens * price_in + output_tokens * price_out) / 1_000_000

    The price difference is mainly caused by how tokens are generated. Each output token requires a complete forward pass through the model. Because each new token depends on the previous result, output tokens must generally be generated sequentially and are difficult to process in parallel.

    Input tokens also require forward computation, but they can usually be processed as a batch with a higher degree of parallelism. This reduces the computing cost per token. The available parallelism is still constrained by factors such as batch size, sequence length, and GPU memory. Input processing is therefore not free; it is simply cheaper in relative terms.

    2. Training Costs: A One-Time Sunk Investment

    Model providers do not usually disclose the full cost of training a frontier model. Industry estimates commonly range from tens of millions of dollars to more than one billion dollars. The large variation is driven by model size, training duration, hardware prices, and electricity costs.

    Training investment mainly consists of three categories:

    • Compute: Tens of thousands of accelerators may run continuously for weeks or even months. Electricity, data-center operations, and hardware depreciation must all be included.
    • Talent: Compensation for core research and engineering teams represents a large and recurring expense.
    • Experimentation: Failed experiments, discarded intermediate checkpoints, and repeated hyperparameter adjustments also consume substantial computing resources.

    These expenses occur before a model is released. For pricing purposes, they need to be amortized across the years during which the model service is available, rather than assigned entirely to a single request.

    3. Model Iterations: Training Costs Recur Periodically

    Model providers typically release new versions on a regular basis, which means research and development spending also recurs from year to year.

    An update does not always require complete retraining from scratch. Common approaches include continued pretraining, incremental training, distillation, and alignment fine-tuning. A new version may be closer to full retraining or rely more heavily on incremental methods, depending on its goals and the size of the change from the previous version.

    Regardless of the approach, each model generation requires new computing resources and engineering effort. As a result, part of the token fees collected today may be used to fund development of future versions. This is one of the main destinations for a provider’s apparent profit margin.

    4. A Worked Example: Calculating the Cost per Token

    The following example uses illustrative figures to demonstrate the calculation method. These numbers do not represent the actual financial data of any company.

    Assume that:

    • The total annual cost of a model service is $4 billion, including $1.5 billion in amortized training costs, $2 billion in inference compute, and $500 million in supporting research, evaluation, and safety work.
    • The service processes 10^15 tokens per year, or 1 quadrillion tokens. Expressed in units of one million tokens, this equals 1 billion units.

    The unit cost is calculated as follows:

    1. Unit cost = Annual total cost ÷ Annual token volume (in millions of tokens)
    2. = $4 billion ÷ 1 billion units
    3. = $4 per million tokens

    In this example, amortized training accounts for $1.50 per million tokens, inference compute accounts for $2, and supporting investment accounts for $0.50. Together, they equal the total cost of $4 per million tokens.

    Because input and output tokens have different prices, the pricing side must use a weighted average:

    1. Weighted average price =
    2. (Input tokens × input price + Output tokens × output price) ÷ Total tokens

    Assume the weighted average selling price is $10 per million tokens. Annual revenue would then be:

    1. 1 billion units × $10 = $10 billion

    After deducting the $4 billion in costs, $6 billion remains. This is gross profit, not net profit. It may be used to fund the next generation of models, expand inference clusters, and support safety alignment and evaluation.

    The average selling price depends on the ratio of input to output tokens. A higher proportion of output tokens generally results in a higher average selling price.

    Based on publicly listed prices, output pricing for flagship models is often in the range of several dozen dollars per million tokens, while input pricing is substantially lower. Prices can change quickly, so current figures should be checked in the provider’s official documentation.

    5. Inference Costs: Why Prices Do Not Fall Indefinitely

    The cost of everyday inference is also significant, mainly for three reasons:

    • Memory and concurrency: Large models require substantial GPU memory for each inference workload. The number of concurrent requests that a single GPU can support is limited, so the fixed cost allocated to each request remains considerable.
    • Long contexts: Under the standard attention mechanism, attention computation grows approximately quadratically with context length. In production systems, providers typically use K…