When people talk about the cost of an AI request, they usually picture one number: the size of the prompt they sent. Real requests have two numbers, the text that goes in and the text that comes back, and both are measured in tokens. Count only the side you wrote and you miss half of what a per-token price is charged on, usually the less predictable half.
This guide separates the two sides: what input tokens are, what output tokens are, why the reply side is harder to pin down, and how to measure each side with the free Token Counter on Ovatly.
Contents
- Quick answer
- The two sides of one request
- What lands on the input side
- What lands on the output side
- How to count each side, step by step
- Worked example: one small exchange, counted exactly
- Why the output side resists exact counting
- Limitations worth knowing
- Common mistakes
- FAQs
- Conclusion
Quick answer
Input tokens are everything you send to the model: your instructions, the document you paste in, and a small amount of per-message structure that chat systems add around your words. Output tokens are the reply the model generates. Both sides are counted in tokens and carry the per-token price, so a request is priced on input plus output, not the prompt alone. Count your input exactly in advance by pasting the text you plan to send into the Token Counter; estimate the output by counting a similar reply from an earlier request. With both numbers, the Prompt Cost Calculator does the money arithmetic; the counter itself states no prices.
The two sides of one request
A single request to a model is an exchange: text flows in, gets processed, and text flows back. The two directions are genuinely different quantities. You control the input completely, since you wrote or chose every word of it, while the output is produced by the model and its length depends on what you asked for and how the model answers.
That difference in control is the heart of this topic. The input side can be measured to the token before you send anything. The output side can only be bounded and estimated. Good cost habits treat the two sides differently: measure one, budget for the other.
What lands on the input side
Your prompt is the obvious part of the input. The less obvious part is everything else you attach to it. Paste a report into the conversation so the model can summarise it, and the whole report is input. Context is not free just because you did not type it this minute; if it is sent, it is counted.
Real chat APIs also add a few tokens per message for role markers and structure, the labels that say which message came from the user and which from the assistant. A raw-text counter cannot see that overhead: it counts the text you paste, not the wrapped payload. Treat a raw count as the content size, with a small extra on top in a real chat request.
What lands on the output side
The output is the reply: the explanation, the summary, the rewritten paragraph, the code. Its length is driven by what you ask for. "Answer in one sentence" produces a short output. "Explain this in detail with examples" produces a long one. Follow-up questions each produce their own output, so a long session stacks up output tokens reply by reply.
Output is also the side where surprises live: two runs of the same prompt can produce replies of noticeably different sizes. So plan output cost as an estimate: take a reply from a similar earlier request, count it, and use that figure as your assumption, with some room above it.
How to count each side, step by step
- Open the Token Counter. Paste or type the full text you plan to send: the prompt plus any document or context that goes with it.
- Click Count tokens and read the token count together with the character and word counts. That figure is your input count, the content size of what you are about to send.
- For the output side, find a reply from an earlier, similar request, paste it into the counter and count it the same way: a grounded estimate for the reply you are about to get.
- Add the two figures for a total token picture of the exchange. If you need prices, take both numbers to the Prompt Cost Calculator, which is the tool that turns token counts into money.
Worked example: one small exchange, counted exactly
The counter's own demonstration texts show the measuring. Take the greeting "Hello, world!" as a tiny prompt: counted exactly, it is 4 tokens, 13 characters, 12 characters without spaces, 2 words and 1 sentence. Four tokens is the input side of that exchange.
Now suppose the model answers with a full sentence: "Prompt engineering is the practice of writing instructions for AI models." That sentence is 12 tokens, the output side. The exchange as a whole moved 16 tokens of content: 4 in, 12 out. Notice the shape, because it is typical: the reply was three times the size of the prompt, and short questions with long answers are the norm. For scale, the pangram "The quick brown fox jumps over the lazy dog" is 9 tokens.
Why the output side resists exact counting
Three reasons. First, the reply does not exist until the model writes it, so there is nothing to count in advance; estimation is not a shortcut, it is the only option. Second, reply length varies between runs. Third, the raw-text count of a reply is its content size, while a real API exchange also carries the small per-message structure around it. None of this makes output planning hopeless: count a comparable reply, add headroom, and your estimate will be close enough to decide with.
Limitations worth knowing
The counter's counts use the GPT tokenizer (o200k encoding), so they are exact for the GPT-4o family and a close approximation for Claude, Gemini and other families, which split text differently. Providers' own counters are the authority for their models. Tokens are not words: common short words are often one token, while rare words, code and non-English text usually take more tokens per word, so never convert with a fixed words-to-tokens ratio. The counter states no prices; pricing lives in the Prompt Cost Calculator and the provider's rate card.
Common mistakes
- Counting only the prompt. The reply is counted too, and it is often the larger side.
- Forgetting the pasted context. A long document attached to a short question makes the input side long.
- Treating an output estimate as a guarantee. A counted past reply is evidence, not a promise; leave room above it.
- Using word counts for money decisions. Prices and limits are set in tokens, and code or non-English text runs well ahead of its word count in tokens.
- Expecting one count to fit every model. A count taken with the GPT tokenizer is exact for that family and approximate elsewhere.
FAQs
What counts as input tokens? Everything you send: your prompt text, any document or context you paste in, and a few extra tokens per message that chat APIs add for role markers and structure. A token counter that reads raw text measures the content; the small formatting overhead sits on top of that.
Can I count output tokens before the model replies? Not exactly, because the reply does not exist yet. The practical estimate is to paste a similar reply from an earlier request into the counter and count that. The longer and more detailed the reply you ask for, the more output tokens to allow for.
Does the Token Counter separate input and output tokens? No. It counts any text you paste into it. Paste the text you plan to send and the result is your input count; paste a reply the model gave you and the same count is that reply's output size. The tool measures text, and you decide which side of the request the text belongs to.
Why do I need the Prompt Cost Calculator as well? The Token Counter measures text and states no prices. Once you have an input count and an output estimate, the Prompt Cost Calculator is the tool that turns those two numbers into money using the rates you enter for the model you use.
Is the count exact for every model? The count is exact for the GPT-4o family encoding the counter uses (o200k). Claude, Gemini and other families split text differently, so for them the count is a close approximation, and the provider's own counter is the authority for its models.
Conclusion
One request, two counts. The input side is yours to measure exactly, and the Token Counter does it in your browser without uploading your text. The output side is yours to estimate honestly, from a counted reply to a similar request. Keep the two numbers separate, feed both to the Prompt Cost Calculator when you need money figures, and no API bill should surprise you by a factor of two again. And when one side is simply too long to send at all, the companion guide shows how to split a long text into chunks that fit token limits. For more guides on working with prompts and tokens, see the AI and Prompt Tools guides.