# Why message 50 of your chatbot costs 19x more than message 1

> Source: <https://dev.to/deployedlabs/why-message-50-of-your-chatbot-costs-19x-more-than-message-1-1no3>
> Published: 2026-11-17 21:01:00+00:00

You build a chatbot and quote the cost of one short message. The real bill arrives, and it is far higher. The reason is two ideas: tokens, and the context window. Here is the arithmetic.

All numbers below are made up for illustration.

A model does not read whole words. It reads tokens: a short word, part of a long word, a piece of a number, or a punctuation mark. A tokenizer cuts your text into these pieces before the model sees it.

Think of it as the model's desk, counted in tokens. Everything for one request must fit on it at once:

If the total is too big, the request fails with a length error. The model also keeps nothing between requests, so the app fills the desk again every time.

Because the app re-sends the history with each new message, a long chat gets heavier with every turn. Assume:

Message 1 sends:

```
500 + 40 = 540 tokens
```

Before message 50 there are 49 old turns:

```
49 x 200 = 9,800 tokens
```

Message 50 sends:

```
500 + 9,800 + 40 = 10,340 tokens
```

Compare them:

```
10,340 / 540 = about 19
```

The customer types about the same amount each time. The same short question sends about 19 times more input, and input is billed per token on every request.

The same pattern at other points in the chat: 2,340 tokens at message 10, and 5,340 at message 25.

A bigger window only delays the problem, because cost and waiting time grow with the size of what you send. Send less, but better:

This article is a short version of Chapter 7 of [Deployed Lab](https://deployedlab.dev). The interactive chapter has a tokenizer you can type into, a slider tool to spend a 32,000-token window across five parts, and a short quiz. It is free with no signup: [Tokens and context windows](https://deployedlab.dev/lessons/07-tokens-and-context). Deployed Lab is a course on AI engineering and the forward deployed engineer role.
