← Back to Blog Token Guide

Input vs Output Tokens: What's the Difference?

Last updated: July 2026

Input tokens are everything you send the model — prompt, system prompt, context, files, and history. Output tokens are what it generates back. Providers price them separately, and output usually costs 3-5x more than input because generating text one token at a time is far more compute-intensive than reading it.

Every API bill and coding-agent charge splits into two numbers: the tokens you send in and the tokens the model sends back. They are counted differently, priced differently, and driven up by different habits. Understanding which is which is the first step to controlling what you spend.

Table of Contents

  1. What Are Input Tokens?
  2. What Are Output Tokens?
  3. Why They're Priced Differently
  4. Input vs Output Rates by Model
  5. What This Means in Practice
  6. How to Manage Both
  7. FAQ

What Are Input Tokens?

Input tokens are everything you send to the model on a request. That is more than just the sentence you typed. It includes the system prompt (the hidden instructions that set the model's behavior), any context you attach, the files or code you paste in, and the entire conversation history up to that point. All of it is tokenized and counted as input.

The history part is what surprises people. In a chat or an agent loop, the model has no memory between requests — so the client re-sends the whole prior conversation on every turn to give it context. That means input tokens accumulate: turn 10 carries turns 1 through 9 along with it. If you are unsure how text becomes tokens in the first place, our explainer on what tokens are in LLMs covers the mechanics.

What Are Output Tokens?

Output tokens are what the model generates in response — the completion. If you ask for a paragraph, the paragraph is output. If you ask a coding agent to rewrite a file, every line it writes back is output. If it explains its reasoning at length before answering, that explanation is output too.

Output is entirely under the model's control once you hit send, but you influence it through your instructions. Asking for "a brief summary" produces far fewer output tokens than asking for "a detailed walkthrough." Most providers also let you set a max_tokens cap that hard-limits how much output a single request can generate — a useful guardrail, since output is the more expensive half of the bill.

Why They're Priced Differently

Providers charge more for output than input — typically 3 to 5 times more per token — and the reason is computational. When the model reads your input, it processes the whole thing in a single parallel pass. But generating output is autoregressive: the model produces one token, appends it, then runs another full forward pass through the network to produce the next token, and so on. A 500-token response means roughly 500 sequential forward passes.

That sequential generation is far more expensive in compute and time than the one-shot read of your input. The pricing simply reflects the hardware cost. It is why a short prompt that triggers a very long answer can cost more than a long prompt that returns a one-word reply.

Input vs Output Rates by Model

Here are representative per-million-token rates for a few widely used models. Notice the multiplier in the last column — output is consistently several times the input price.

ModelInput / 1MOutput / 1MOutput multiplier
Claude Sonnet~$3.00~$15.005x
Claude Opus~$15.00~$75.005x
GPT-4o~$2.50~$10.004x

Rates change over time and vary by tier, so treat these as illustrative rather than a live price sheet. The pattern is what matters: across providers, output lands in the 3-5x range above input. For a fuller side-by-side, see our AI token pricing comparison, and to price a specific prompt you can plug the numbers into the token calculator.

What This Means in Practice

Because output carries the higher rate, long and verbose responses cost disproportionately more than they look. A model that pads every answer with restated context, caveats, and a summary of what it just did is spending your most expensive tokens on filler.

In a coding agent the two halves pull in different directions, and both can balloon:

A single agent session can therefore be input-heavy, output-heavy, or both, depending on how it is run. Our breakdown of AI coding agent costs walks through where the tokens actually go across a real session.

How to Manage Both

Once you can see the two numbers separately, the levers are straightforward. A few habits keep both columns in check:

The goal isn't to minimize tokens for its own sake — it's to stop paying premium output rates for filler and to stop re-paying input rates for context the model already has.

See Your Input and Output Tokens Per Request

Terse compresses the prompts you send and tracks per-request token cost — on-device, zero latency, no API calls. Cut the input wordiness before it compounds across every turn.

Try Terse

Frequently Asked Questions

What is the difference between input and output tokens?

Input tokens are everything you send to the model — your prompt, the system prompt, attached context, files, and conversation history. Output tokens are what the model generates in response. Providers count and price them separately.

Why do output tokens cost more than input tokens?

Output usually costs 3-5x more than input because generating tokens is more compute-intensive. The model reads the whole input in one parallel pass, but it must produce output autoregressively — one token at a time, each requiring a full forward pass through the network.

Do input or output tokens cost more in a coding agent?

It depends on the session. Re-sent context inflates input tokens on every turn, so long agent runs are often input-heavy. But large diffs and verbose explanations inflate output tokens, which are priced higher per token. Both need managing.

How do I reduce output token costs?

Ask for concise responses, set a max output token cap, and avoid requesting long restatements or full-file rewrites when a diff will do. Because output is priced 3-5x higher than input, trimming verbose responses has an outsized effect on the bill.

Further Reading

Related articles

What Are Tokens in LLMs? What Is a Context Window? What Is Prompt Compression?