Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Estimate What an AI Model Will Cost You (Tokens and Prices)

    Updated December 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    Most AI models that you reach through an API are billed per token, with a price for what you send in and a separate, usually higher price for what the model writes back. This guide shows how to turn that into a cost per request, per day and per month, and which things can change the total.

    Try the tool: AI Cost Calculator

    How AI models charge

    Providers state their prices per million tokens. The input tokens are everything you send, including the instructions, earlier messages and any attached text. The output tokens are what the model generates. Input and output have different prices.

    Anthropic's price page, for example, lists a base input price and an output price per million tokens (MTok) for each model, plus extra rows for caching. Prices differ per model and change over time, so always copy the current numbers from the provider's own page.

    Source: Anthropic: Pricing

    The cost of one request

    Cost of one request = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price). The example below uses made-up prices of 2 and 10 per million tokens, only to show the sum.

    StepExample
    Input: 2,000 tokens at 2 per million0.004
    Output: 500 tokens at 10 per million0.005
    One request0.009
    100 requests a day0.90
    30 days27.00

    Fill in your own token counts and prices in the calculator below. It has no prices built in, because they change, and it also shows the cost per 1,000 requests, per day, per month and per year.

    What can change the total

    • Prompt caching: reusing a long, unchanged part of a prompt can be cheaper. Anthropic's docs describe cache writes at 1.25 times the base input price for the 5-minute cache and 2 times for the 1-hour cache, and cache reads at 0.1 times the base input price. Other providers use other rules.
    • Batch processing: Anthropic's Batch API gives a 50% discount on input and output tokens, in exchange for asynchronous processing.
    • Long prompts: for some models, Anthropic charges a higher rate for all tokens when a request goes over 200,000 input tokens.
    • Tools and extras: server-side tools such as web search can be charged separately, on top of the tokens.

    Always check the discounts and multipliers on the provider's page before you rely on them, because they differ per model and can change.

    Keep an eye on the context window

    A model can only read a limited number of tokens at once, called the context window. In many chat setups the earlier messages are sent again with every new message, so a long conversation gets more expensive and can eventually stop fitting. Paste your text into the meter to see how much room is left, and keep some room for the answer.

    Common mistakes

    • Using the price of one model for another.
    • Forgetting that output tokens usually cost more than input tokens.
    • Counting only your question and forgetting the instructions and earlier messages that are sent along.
    • Using old prices. Check the date on the price page.

    More guides