# What every token costs

> Price a short prompt and a long one on a small model and a large one, see why the answer and the model size set the bill and the wait, and find the rule a long instruction file buried.

Page: https://schubergphilis.github.io/ai-training/concepts/what-tokens-cost/
License: CC BY-SA 4.0, https://creativecommons.org/licenses/by-sa/4.0/

Your team wants a chat assistant to write a summary of every meeting's notes
for the finance team, about a thousand times a month. Before anyone approves it, someone
asks what it costs, and someone else asks why last week's trial ignored
the rule about bullet length that was in the instructions. Both answers
come from counting tokens. In this lesson we price a short prompt
and a long one on a small model and a large one. Then we find the rule
that a long instruction file buried.

The lesson on [what the model can see](https://schubergphilis.github.io/ai-training/concepts/context-window/) counted a
page of text in tokens. This lesson puts a price on each one.

## The same task, asked twice

The short prompt states the task, the format and the audience, then gives
the notes.

```text
Summarize these meeting notes in five bullet points for the finance team.
Keep each bullet under 20 words.

Meeting notes, project Lantern, 14 March.
Present: Ana, Bram, Chidi. The supplier moved the delivery of the sensor
boards from April to June. Ana will confirm the June date in writing by
Friday. The installation guide needs a shorter version with one photo per
step. The pilot in the Utrecht warehouse moves to July. Next meeting on
28 March.
```

The long prompt asks for the same summary of the same meeting. It opens
with a greeting, explains what project Lantern is, says why the finance
team is busy, apologizes for the trouble, gives the notes in full
sentences and closes with thanks. It is the kind of prompt people write
when they treat the assistant as a colleague. Counted with the same
rule of thumb as
[the context window lesson](https://schubergphilis.github.io/ai-training/concepts/context-window/#count-the-tokens-of-a-page),
about four characters per token, the two
come out like this, with the answer the model writes added for the price
table below. Both counts are estimates, and the vendor's own tokenizer
gives the exact number.

```text
short prompt: 111 tokens (estimate)
long prompt: 343 tokens (estimate)
difference: 232 tokens
answer: 120 tokens (assumed)
```

The long prompt is three times the short one, and every extra token is a
token the model reads before it writes a word. Most of the extra text is
about you and your feelings about the task. The summary comes out the same without it.

## What a token costs

A vendor charges by the million tokens, with one price for the tokens the
model reads (input) and a higher price for the tokens it writes (output).
The model reads the whole prompt in one pass, and then each token of the
answer takes a pass of its own through the model. A written token costs
the vendor more than a read one for that reason. The table below uses round example
numbers for "a small model" and "a large model", chosen for this lesson.
They follow the pattern on the market in 2026, where a vendor's large model
costs several times its small one and output costs about five times
input. The current prices are on the vendor pricing pages
(Pricing, Claude Platform documentation), and they change more often than this page does.

| Example prices, per million tokens | Input | Output |
| ---------------------------------- | ----- | ------ |
| A small model                      | $0.60 | $3     |
| A large model                      | $6    | $30    |

A call is the prompt going in and the answer coming out. Suppose every
summary is the same five bullets, about 120 tokens of output. Priced at
the example numbers, once and for the thousand summaries a month the team
at the top of the page wants, the two prompts come to this.

```text
                            one call     1,000 calls
small model, short prompt    $0.0004           $0.43
small model, long prompt     $0.0006           $0.57
large model, short prompt    $0.0043           $4.27
large model, long prompt     $0.0057           $5.66
```

Read the table down and then across. Down, the choice of model moves the
price by ten times. Across, the extra 232 tokens of politeness move it by
about a third. One call costs a fraction of a cent on either model, which
is why nobody notices the price of one chat. At a thousand calls a month
the summaries cost the team under a dollar on the small model and about
five on the large one, which answers the first question from the top of
the page. The same table for a support team that makes a hundred times as
many calls has two more zeros in every row, and there the choice of model
is a line in the budget.

The answer is often the expensive part of a call, because output costs
more per token, so asking for five bullets instead of a page saves more
than trimming a greeting. A document you paste is input, so a 3,000-token
report attached to every call costs more than any prompt you would write
by hand. A long chat sends the whole conversation again with every
message, so the tenth turn of a chat costs the tokens of the ten turns
before it, on top of the new ones (How agents think: tokens and context, reasoning strategies, model choice, system prompts, Agent Engineer Course).

#### Checkpoint: Which change saves the most?

A colleague runs a summary call many thousands of times a month and wants
to lower the bill. Which one change saves the most money?

- Cut the greeting and the thanks from the summary prompt.
- Ask for five bullets instead of the one-page summary the team asked for last week.
- Send the meeting notes as an attachment instead of pasting them.
- Ask the model to answer faster.

## Small model or large

Vendors publish models in a family with several sizes, and the sizes
share a name and a release date but differ in price and in what they can
do. The larger model follows a complex instruction more reliably and reasons
through more steps, and it costs more per token and produces each token
more slowly (Models overview, Claude Platform documentation). The smaller one is cheaper and faster,
and for a narrow task with a clear instruction, such as a five-bullet
summary in a fixed format, it is often good enough
(AI capabilities and limitations, Claude Academy).

The time you wait has the same structure as the price. A model produces
its answer one token at a time, as the [lesson on how models
work](https://schubergphilis.github.io/ai-training/concepts/how-models-work/#one-token-at-a-time) showed. So a
long answer takes longer than a short one on any model, and a large model
takes longer per token than a small one. A long prompt adds a smaller
delay up front, while the model reads it. Cost and latency both grow with
every token, and both grow faster on a larger model.

Which model fits which task is a decision of its own, and the course on
using agents has a lesson that puts a small and a large model side by
side on the same inputs. Here the point is only what changes when you
switch: the price moves by a factor of several, and the wait changes too.

#### Checkpoint: What does the switch change?

The team moves the meeting summaries from the large model to the small
one. The prompt and the five bullets stay the same. What happens to the
price and the wait of each call?

- The price and the wait both drop, because each token costs less and comes faster.
- The price drops, and the wait stays the same, because the answer has the same number of tokens.
- The wait drops, and the price stays the same, because the model reads and writes the same tokens.
- Neither changes, because the prompt and the answer are the same.

## The rule that got buried

Now the second question from the top of the page. Last week's trial used
an instruction file, a page of rules the team wrote once and pasted at the
start of every chat. Rule seven said "keep each bullet under 20 words".
The summary that came back had bullets of 40 words. The file below is
illustrative, written for this lesson, and shortened to twelve rules from
the twenty-two the team had.

```text
You summarize meeting notes for the finance team of project Lantern.
1. Write in plain English for readers outside the project.
2. Use the past tense for what happened and the future tense for what is planned.
3. Start with the decision that affects the budget most.
4. Name the person who owns each action, as in the notes.
5. Give every date as day and month, as in "14 March".
6. Do not mention people who were absent.
7. Keep each bullet under 20 words.
8. Use "supplier" rather than a company name.
9. Put open questions in a final bullet that starts with "Open:".
10. Do not add facts that are not in the notes.
11. If a meeting had no decision, say so in the first bullet.
12. Write "sensor boards", never "sensors" or "boards".
```

Every line of the file is a token in the context window like every other,
and a rule stated once competes with everything that comes after it: the
other eleven rules, the notes, and the answer the model is writing. The
model has no list of rules it checks off. It predicts the next token from
the whole window, and a rule in the middle of a long file weighs less in
that prediction than the same rule at the top or at the bottom. Liu and
colleagues measured the effect on facts: models found a fact in the middle
of a long context less reliably than the same fact at either end
(Lost in the Middle: How Language Models Use Long Contexts, Transactions of the Association for Computational Linguistics 12 (2024), 157-173). The [lesson on how models
work](https://schubergphilis.github.io/ai-training/concepts/how-models-work/#failure-modes-named) named this
**instruction dilution**, and the [lesson on the system
prompt](https://schubergphilis.github.io/ai-training/concepts/system-prompt/) showed that a system prompt is subject to
it too.

Dilution here is about one prompt or one file, where an instruction
competes with the text after it. A long chat has a second, separate effect:
the window fills, early turns fall out or get summarized, and the model
loses the facts rather than weighing them less. The context window
lesson covered that under [when the early facts fall
out](https://schubergphilis.github.io/ai-training/concepts/context-window/#when-the-early-facts-fall-out), and a later
lesson on memory returns to it.

Shorten the file first. A rule the model keeps anyway ("write in plain
English") doesn't help and dilutes the rules that matter. Then look
at the rules that are left and ask, for each one, what happens when the
model drops it. A rule you can live without once in a while stays in the
file, near the top. A rule that must hold every time belongs in a check
that a person or a program runs on the answer, such as counting the words
in each bullet, because prose in an instruction file is a strong default
and never a guarantee (AI capabilities and limitations, Claude Academy).

#### Checkpoint: Why did rule seven fail?

The instruction file above was pasted as the first message of a new chat,
followed by the notes. The summary ignored rule seven. Which explanation
fits?

- The model keeps a checklist of the rules it was given and ran out of room at the seventh.
- Twenty words is too few for a summary of these notes, so the model overrode the rule.
- The rule sat in the middle of a long file and weighed less than the rules at either end.
- The model forgot the rule because the chat was two hours old.

#### Pitfall: Adding a rule for every mistake

The summary breaks rule seven. The team adds rule thirteen: "Remember
rule 7." The next summary breaks rule five instead, and rule fourteen goes
in. After a month the file is two pages, every summary breaks one rule or
another, and each call costs more because the file is read on every one.
The rules were never the problem. Each one added made the others count for
less. The rule: when a model drops an instruction, shorten the file before
you lengthen it, and move a rule that must always hold into a check on the
answer.

## Exercise

Open a chat assistant and find the longest prompt you sent this week.
Paste it into a new chat and ask the assistant for an approximate token
count, or use the token counting page your vendor publishes. Then count
the tokens of the answer you got the same way. Price the call at the
example numbers from this lesson, for the small model and the large one,
once and for a thousand calls a month. Rewrite the prompt with only the
task, the format, the audience and the material, count it again and price
it again.

A good result is two lines: the token counts of your prompt and the
answer with the two monthly prices, and the token count of the rewrite
with its two prices. The counts are
approximate, because the assistant estimates them the way the rule of
thumb does. Then answer this: of the money in your line, how much is the
answer, and what would change if you asked for half as much of it?

Stretch: Take an instruction file or a long list of rules you use with a chat assistant, count its rules, and mark each one as a default you can live without now and then or a rule that must always hold. Move one of the second kind into a check you run on the answer, and cut two of the first kind.

## Recap

1. A vendor charges per million tokens, with a lower price for the tokens
   the model reads and a higher one for the tokens it writes, and a large
   model in a family costs several times a small one (Pricing, Claude Platform documentation).
2. One call costs a fraction of a cent, and the bill comes from the number
   of calls. The choice of model moves the price by a factor, the length of the
   prompt and the answer by a share, and a long chat pays for every earlier
   turn again (How agents think: tokens and context, reasoning strategies, model choice, system prompts, Agent Engineer Course).
3. The wait grows the same way, because a model writes one token at a
   time. A long answer on a large model is the slow case.
4. A rule in an instruction file is tokens like everything else and
   competes with all the text after it, so a rule in the middle of a long
   file weighs less than one at either end (Lost in the Middle: How Language Models Use Long Contexts, Transactions of the Association for Computational Linguistics 12 (2024), 157-173). Shorten the file,
   and move a rule that must always hold into a check on the answer.

## References

- Pricing, Claude Platform documentation, https://platform.claude.com/docs/en/about-claude/pricing
- How agents think: tokens and context, reasoning strategies, model choice, system prompts, Agent Engineer Course, https://lsimons.github.io/agent-engineer-course/02-how-agents-think/
- Models overview, Claude Platform documentation, https://platform.claude.com/docs/en/about-claude/models/overview
- AI capabilities and limitations, Claude Academy, https://academy.claude.com/courses/ai-capabilities-and-limitations
- Lost in the Middle: How Language Models Use Long Contexts, Transactions of the Association for Computational Linguistics 12 (2024), 157-173, https://aclanthology.org/2024.tacl-1.9/
