Skip to content
MasterMath

AI Token Cost Calculator

What a language model costs per request, per day and per month, with separate input and output prices and the cache discount.

Cost a month

—

Cost a month—
Per request—
A day—
Share taken by output—
Requests per unit of money—
Tokens a month—
Words per request, approx.—
A year—

How this was worked out

    The formula

    cost = input ÷ 10⁶ × input price + output ÷ 10⁶ × output price

    Where it comes from

    A language model charges per token, and it charges differently by direction: output costs several times more than input. That flips the intuition: a five-hundred-token reply costs more than a fifteen-hundred-token context, even with a third of the tokens. So the page separates the two lines and says what share of the cost is output, which is the figure that decides whether to ask for shorter replies or trim the context.

    How to work it out by hand

    1. Divide the input tokens by a million and multiply by their price
    2. The same for the output tokens, at their price
    3. Add the two: that is the cost of one request
    4. Multiply by requests a day and by thirty

    What is worth knowing

    Context caching charges a discounted rate for the part of the input repeated between requests — system instructions, long documents — and only that part: if half the input comes from cache at a 90 % discount, input costs 45 % less and output exactly the same. On words: a token is about three quarters of a word in English and a little less in other languages, because long words and accented letters split into more pieces. The figure the page gives is for a rough idea, not for invoicing.

    Frequently asked questions

    How much does a request to a language model cost?

    Input and output separately, each at its price per million. With 1,500 in at 3 and 500 out at 15, just over a cent.

    Why does output cost more?

    Because generating is dearer than reading. Providers reflect it with a per-token price several times higher.

    How many words is a token?

    About three quarters in English and a little less in other languages. It is an approximation.

    What does caching save?

    Only the part of the input repeated between requests, at whatever discount the provider sets. Output is charged the same.