When people estimate the cost of an AI feature, they usually measure the prompt and stop there. The prompt is the part they wrote, so it is the part they count. But a pay-per-token API charges for two things: the tokens you send and the tokens the model sends back. If your feature asks for long replies, the second charge can become the bigger one, and a budget built on the prompt alone will be wrong from day one.
This guide shows how output length changes the total, using the free Prompt Cost Calculator on Ovatly. The calculator works from a snapshot price table dated November 2026. Every rate below is that snapshot's example, labeled as such on the tool: "Snapshot: November 2026. Prices and limits change; verify with the provider before budgeting." Treat the figures as a worked example, never as a live market price.
Contents
- Quick answer
- Two prices, not one
- Why output length moves the total
- How to estimate a prompt's cost, step by step
- Worked example: the same prompt at two reply lengths
- Estimating output before the call is made
- Limitations and alternatives
- Common mistakes
- FAQs
- Conclusion
Quick answer
Your cost per run is input tokens times the input price, plus output tokens times the output price. In the calculator's snapshot example for GPT-4o, input is $2.50 per 1M tokens and output is $10.00 per 1M tokens, so output tokens cost four times as much each. Doubling the reply length doubles the output part of the bill. To see the effect on your own prompt, open the Prompt Cost Calculator, count your input, then try two or three plausible output lengths and compare the totals.
Two prices, not one
Per-token pricing splits every call into two multiplications. The input side covers everything you send: the prompt itself, and anything your app attaches to it. The output side covers the reply the model generates. Providers quote both rates per million tokens, and the two rates are not equal.
The calculator's worked example makes the gap concrete. For GPT-4o, the snapshot records $2.50 per 1M input tokens and $10.00 per 1M output tokens. At those rates, 500 output tokens cost $0.0050, which is exactly what 2,000 input tokens cost. A reply of a few hundred tokens is not a rounding error next to the prompt; it carries the weight of a prompt several times its size.
This is also why two features with identical prompts can have very different bills. A classifier that answers with one word and a writer that answers with three paragraphs send the same kind of input. Their output costs are in different worlds.
Why output length moves the total
The output part of the bill is linear: output tokens times a fixed rate. Nothing about it flattens out as replies grow. If a reply doubles from 500 to 1,000 tokens, the output cost doubles with it.
Three ordinary design choices decide where you land on that line. The first is what you ask for: "summarise this" and "summarise this, then explain your reasoning, then give three alternatives" produce very different lengths from the same input. The second is the maximum output your API call allows, which caps the worst case. The third is volume: per run, the difference between a short and a long reply is a fraction of a cent, but multiplied by the number of runs, which the calculator lets you enter, it becomes a monthly figure worth arguing about.
None of this makes long replies wrong. Sometimes the long reply is the product. The point is to choose the length on purpose, with the price visible, instead of discovering it on an invoice.
How to estimate a prompt's cost, step by step
- Open the Prompt Cost Calculator and choose a model from the snapshot table.
- Paste your prompt and click Count input tokens, or type the token counts directly.
- Enter the output tokens you expect, and how many identical runs you plan.
- Click Estimate cost and read the breakdown, shown to 4 decimal places: input cost, output cost and total.
To test output length specifically, keep the input and the run count fixed and change only the output figure. Run it once with the reply length you hope for, and once with the maximum output your call allows. The two totals are your realistic case and your worst case.
Worked example: the same prompt at two reply lengths
Start with the tool's own worked example. Model: GPT-4o, at the snapshot prices of $2.50 per 1M input tokens and $10.00 per 1M output tokens. Input: 1,000 tokens, so the input cost is 1,000 / 1,000,000 x $2.50 = $0.0025. Output: 500 tokens, so the output cost is 500 / 1,000,000 x $10.00 = $0.0050. Total for one run: $0.0075. Notice that the reply, half the prompt's size, already costs twice as much.
Now apply the same arithmetic to a longer reply. Keep the input at 1,000 tokens and raise the output to 2,000 tokens. The input cost is unchanged at $0.0025. The output cost becomes 2,000 / 1,000,000 x $10.00 = $0.0200. The total is $0.0225, three times the original run, from a change on the output side alone. At 10,000 runs, the difference between the two designs is $75 against $225. Same prompt, same model, same rates: only the reply length moved.
Estimating output before the call is made
Output length is the one number in this calculation you cannot know in advance. The tool's own FAQ is blunt: you cannot know it exactly. Two estimation routes are supported. First, measure a similar past reply: run the task once, paste the reply into the Token Counter, and use that count as your expected output. Second, use the maximum output your API call allows, which gives you a worst case you can budget against.
For a feature still being designed, run both. The measured reply tells you what the feature costs when it behaves; the maximum tells you what it costs when a user makes it write an essay. If the worst case breaks the budget, the fix is a design change: a lower maximum, a shorter requested format, or a cheaper model, and it is far better made now than after launch.
Limitations and alternatives
The calculator is an estimating tool for planning, never a live quote. Its prices are a snapshot dated November 2026, and providers change prices, so verify with the provider before budgeting. Real bills can differ from the estimate: providers may add charges for caching, tools, images or minimums, and output length is always a guess until the call is made.
One entry in the table needs its own caveat. The open-weights Llama entry is priced at $0 because you run it yourself; your real cost is your own hardware or hosting, which this calculator does not estimate. A $0 line in the breakdown means the meter is somewhere else, not that the call is free.
Common mistakes
- Budgeting from the prompt alone. The reply is charged too, and at the snapshot rates each output token costs four input tokens. Ignoring it understates every run.
- Using the hoped-for reply length as the only figure. Always run the maximum output your call allows as a second case, so the worst case is a number you have seen.
- Guessing output tokens by word count. Tokens are not words. Measure a real reply with the Token Counter instead of estimating by eye.
- Treating the snapshot as a quote. The rates are dated November 2026 examples. A budget committed against them without checking the provider's current pricing page is a budget built on old numbers.
FAQs
Are these prices current? They were recorded in the November 2026 snapshot and are labeled as such. Providers change prices, so check the provider's pricing page before committing a budget.
How do I know my output token count in advance? You cannot know it exactly. Estimate from similar past replies (the Token Counter can measure one), or set the maximum output your API call allows, to get a worst case.
Why is output priced higher than input in the example? The snapshot table simply records different rates for the two directions: $2.50 per 1M input tokens and $10.00 per 1M output tokens for GPT-4o. The calculator applies the table as recorded; check the provider's pricing page for the rates that apply to you.
Does the calculator call any API? No. It multiplies your token counts by the snapshot prices in your browser.
Why is the total so small? Per-token prices are fractions of a cent for a single short prompt. Costs become meaningful at volume, which is why the tool can multiply by a number of runs.
Conclusion
Output length is not a detail of the reply; it is half the price of the call, and at the snapshot rates it is the more expensive half, token for token. Count your input, estimate your output honestly, once from a measured reply and once from the maximum you allow, and let the Prompt Cost Calculator show you both totals before the design hardens. The companion problem is the input side of a long conversation, where the history you keep resending grows on every turn; that is covered in How to Cut API Costs by Trimming Conversation History. For more guides like this, see the AI and Prompt Tools guides.