CCalclabhub

Work

The token estimate

Four characters per token is the usual English average. It is close enough for planning a budget and nowhere near accurate enough for billing, which is why the figure is labelled an estimate.

Last updated

The Formula

tokens = characters / 4, rounded up, for English text

Four characters per token is the usual English average. It is close enough for planning a budget and nowhere near accurate enough for billing, which is why the figure is labelled an estimate.

SymbolMeaning
LCharacters
n_tokRough tokens

What Each Symbol Means

Lcharacters

Characters

The length of the assembled prompt.

n_toktokens

Rough tokens

L divided by four and rounded up.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to write chatgpt prompts page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Write ChatGPT Prompts, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.

Common Questions

What is the formula for The token estimate?

The formula for The token estimate is tokens = characters / 4, rounded up, for English text. Four characters per token is the usual English average. It is close enough for planning a budget and nowhere near accurate enough for billing, which is why the figure is labelled an estimate.

What units should I use with The token estimate?

Substitute L in characters, n_tok in tokens. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.

What is a common mistake when using The token estimate?

Writing the task as a feeling rather than an instruction. Help me with this listing gives the model nothing to do. A verb and an object, such as rewrite this product description, is the difference between an instruction and a hope.