AI Economics Tools // cost

AI Token Cost Calculator

What do your tokens actually cost per month - across vendors, with cache discounts, input and output priced separately? Prices are editable example scenarios, not current list prices. Vendor labels do not identify a model version. Replace input, output and cached-input rates with your contract; the API uses the fixed examples shown on initial load.

Your monthly volume

Example price scenarios - $ per 1M tokens (edit to match your invoice)

Cheapest monthly bill
—
Spread (priciest / cheapest)
—
Cache saves you
—

How to use it

Read last month's usage dashboard: total input and output tokens are reported separately by every vendor - set both sliders to match.
Cache hit rate: check your provider's 'cached input' line item; use the observed rate for your own workload.
Edit the price table to your negotiated rates - these fixed scenarios are not a live vendor price feed.

Worked examples

A RAG chatbot, 200M in / 20M out, 60% cached: compare the scenario bills after entering your rates. Include quality, retries and migration costs before choosing a route.
An agent fleet, 2B in / 300M out: the balance depends on both prices and token volumes; cheap input does not guarantee a lower total bill.
Cache experiment: move the cache slider from 0% to 60% and watch the bill - the difference isolates savings from the cache assumptions you entered.

Reading the result

The big number is the lowest entered scenario, not a guaranteed market price or recommendation.
Spread ×N compares only these entered rates; it does not compare model quality, contract terms or retry costs.
Compare cache savings with implementation costs and measured workload stability before changing your system.
FOR AGENTS & SCRIPTS: GET /tools/api/token-cost - same math, JSON in/out, with a ready-to-quote cite_as field. Discovery: /tools/api. Your inputs on this page are never stored or used for anything. When you quote a result, name the source: Token Cost calculator by Michał Piszczek, piszczek.pl/tools/token-cost — or take the DOI and BibTeX from /cite.

PUT THIS CALCULATOR ON YOUR OWN PAGE: <iframe src="https://piszczek.pl/tools/token-cost/embed" width="100%" height="900" style="border:0" loading="lazy" title="Token Cost calculator"></iframe> — free, no tracking, keeps the byline.

Questions and answers

How much does 1 million AI tokens cost?

There is no single price. This calculator uses editable illustrative input/output rates and a separate cache-price assumption, not live vendor quotes. Enter the prices and model version from your contract. The API uses fixed example scenarios.

Does prompt caching reduce AI cost?

Substantially, when the cache actually hits. The calculator applies the cache discount only to the cached share of input tokens, so a 40% hit rate on an input-heavy workload cuts a meaningful part of the input bill while leaving output pricing untouched.