Skip to content

LLM Token Calculator

Paste any prompt and instantly see its token count and cost across every GPT, Claude, and Gemini model we support.

Free. No account needed.

Upload or drop a file — .txt, .md, .markdown, .text

Your prompts stay private. Tokenizing and pricing run entirely in your browser — the text you paste is not uploaded, logged, or used to train anything. It leaves this page only if you ask it to: by saving a calculation while signed in, or by using Smart rewrite, which is described where it appears.

Comparison across models

Model & contextTokensInput cost
  • GPT-5.6 Sol
    OpenAI
    <1% of 1.1M
    162example
    $0.00081$5/M
  • GPT-5.6 Terra
    OpenAI
    <1% of 1.1M
    162example
    $0.000324$2/M
  • GPT-5.6 Luna
    OpenAI
    <1% of 1.1M
    162example
    $0.0000324$0.2/M
  • GPT-4o
    OpenAI
    <1% of 128K
    162example
    $0.000405$2.5/M
  • GPT-4o mini
    OpenAI
    <1% of 128K
    162example
    $0.0000243$0.15/M
  • GPT-4.1
    OpenAI
    <1% of 1.0M
    162example
    $0.000324$2/M
  • GPT-4 Turbo
    OpenAIRetires Oct 2026 → GPT-5.6 Sol
    <1% of 128K
    162example
    $0.00162$10/M
  • GPT-3.5 Turbo
    OpenAIRetires Oct 2026 → GPT-5.6 Terra
    <1% of 16K
    162example
    $0.000081$0.5/M
  • Claude Opus 5
    Anthropic
    <1% of 1M
    162example
    $0.00081$5/M
  • Claude Sonnet 5
    Anthropic
    <1% of 1M
    162example
    $0.000324$2/M
  • Claude Haiku 4.5
    Anthropic
    <1% of 200K
    162example
    $0.000162$1/M
  • Gemini 3.1 Pro
    Google
    <1% of 1M
    150example
    $0.0003$2/M
  • Gemini 3.6 Flash
    Google
    <1% of 1M
    150example
    $0.000225$1.5/M
  • Gemini 2.5 Flash
    Google
    <1% of 1M
    150example
    $0.000045$0.3/M
  • Gemini 3.1 Flash-Lite
    Google
    <1% of 1M
    150example
    $0.0000375$0.25/M

Rates shown are input pricing per 1M tokens. Paste a prompt to price it against every model.

GPT counts are computed in your browser with an OpenAI-compatible tokenizer and are exact. Claude and Gemini counts are estimates based on average characters per token — labelled est — because those tokenizers are not publicly available to run here; treat them as close approximations for planning rather than as billable figures.

Pricing data last verified: .

Provider pricing can change. Check current rates with OpenAI, Anthropic, and Google before making billing decisions.

Keep your calculations

A free account saves what you count, so a number you worked out last month is still there when someone asks where it came from.

  • Save calculations and file them in collections
  • History of everything you have counted
  • Share a calculation by link, public or unlisted
  • Export to CSV, JSON, Markdown, or ZIP

The calculator works without one — nothing is stored unless you sign in.

What is a token?

Models do not read words. They read tokens — subword units produced by a tokenizer, where a common word is usually one token and a rarer word splits into several. Every provider bills per token, and every context window is measured in them, so it is the only unit that matters for both cost and capacity.

For ordinary English the rules of thumb are roughly 4 characters to a token and 100 tokens to about 75 words. They are averages, not arithmetic: code, JSON, and text in languages other than English tokenize considerably worse, sometimes at twice the token count for the same visible length. That is why the calculator counts your actual text rather than multiplying its length.

Knowing the real count is what lets you answer the two questions that decide a build: what a request costs, and whether it fits the window at all.

Calculate Token is a free tokenizer and cost calculator for large language models. Paste text once and it counts and prices that text against every model in the catalogue at the same time, with no account and nothing to install. For the full mechanics — exact versus estimated counting, long-context pricing, and where this number can diverge from a real invoice — see the methodology page.

How it works

  1. 1Paste your promptOr drop in a .txt or .md file. Counts update as you type.
  2. 2Read every model at onceNo picker — every model is counted and priced side by side, GPT, Claude and Gemini together.
  3. 3Compare cost and capacitySwitch between input and output pricing, see what fits the context window, and save, share or export the result with a free account.

Common questions

All questions

For GPT models, yes. Calculate Token runs OpenAI's own tokenizer in your browser, so a GPT count matches what OpenAI would bill for the same text. For Claude and Gemini it is an estimate: neither Anthropic nor Google publishes a tokenizer that can run in a browser, so those counts are derived from character length and every one of them is labelled "est" in the table. Estimates are usually close, but treat them as estimates.

Counting never leaves your browser — GPT counts are computed locally with the real tokenizer, and Claude and Gemini counts are estimated locally from character length. One feature is different, and it is opt-in: Smart rewrite sends your prompt to Google's Gemini for a tighter version. Nothing else transmits what you typed unless you are signed in and choose to save a calculation, which stores the prompt text until you delete it.

15 models from three providers: OpenAI's GPT range (8 models, including the GPT-5.6 series, GPT-4o and GPT-4.1), Anthropic's Claude models (3: Opus, Sonnet and Haiku), and Google's Gemini models (4, including Gemini 3.1 Pro, Gemini 3.6 Flash and Flash-Lite). It is a selection of each provider's range rather than all of it — the models people actually price — and the full list with rates is on the models page.

The catalogue was last verified on 2026-08-31. It records when the figures were checked against every provider's own pricing page, not that today's page still matches them — providers change rates, run promotions and price long-context requests differently, sometimes without much notice. If that date is more than 30 days old, the site says so wherever the date is shown. Check the provider's own pricing page before committing to a number; every model page links to it.

Three things account for most of the gap, and none are visible in a block of text. System prompts are charged on every call, so a 600-token system prompt is billed whether or not the user's message is short. Conversation history compounds, because every prior turn is resent as input on the next one. And retries are billed — a failed parse or a client timeout pays for the request twice. Calculate Token prices the text you paste, which is a floor rather than a forecast.

Learn about token costs

All posts
Several providers charge a flat rate up to a threshold and a multiplied one past it — applied to the whole request, not the overage. Crossing that line by a single token roughly doubles the input cost of everything you sent.
View More
5 min read
A system prompt and a set of tool definitions get billed on every single call in a multi-turn or agentic session, not once — and JSON schemas tokenize worse than prose. That fixed cost is often larger than the message a user actually typed.
View More
GPT-4 Turbo and GPT-3.5 Turbo both leave OpenAI's lineup on 23 October 2026. The named replacements aren't drop-in on price or tokenizer — one gets cheaper and vastly roomier, the other gets pricier for a window many workloads won't use.
View More