Skip to main content
tokenmath
Menu

Calculator

Token math for Claude, Gemini, and GPT.

Paste a prompt. See the exact token count and API cost across every current model. Tokenization runs in your browser; nothing about your prompt leaves the page.

Client-side. Never uploaded.
0 / 1,000,000 charactersContext window: 200,000 tokens
Or start with an example
Total estimated cost
$0.015Claude 4.5 Sonnet
Tokens±2% approx
0
Input cost
$0.00
Output cost (est.)
$0.015
@ 1,024 response tokens
Context used
0%
of 200,000
Verified 2026-05-09 · ±2%
Saved scenariosnone yet

Saved on this browser only — never uploaded. Up to 10 scenarios.

Tip: save a scenario when you have a prompt + model + response length you might revisit. Useful for sizing features before committing to a vendor.

Verify privacysince this page loaded — updates live
Prompt uploads0Always 0 — by design
Outgoing requests0Analytics + page assets only — no prompt content
Cookies on this origin0Vercel Analytics + Clarity may set first-party cookies
localStorage keys0Theme preference + saved scenarios live here
Server endpoints1/api/og only — accepts title + subtitle, never prompt text
Inspect

Open DevTools → Network. Type into the calculator. No request bodies should contain your prompt text.

OpenAI counts are exact; Claude and Gemini are approximate (±2–3%) — neither vendor publishes a current client tokenizer. Pricing reflects published rates as of 2026-05-09.

Keyboard shortcuts

Press ? any time to reopen this list.

Show this overlay?
Toggle themet
Focus the prompt textarea/
Go to homegh
Go to modelsgm
Go to pricing datagp
Go to changeloggc
Go to aboutga
Close overlays / dialogsEsc

We use Vercel Web Analytics for aggregate page metrics and (optionally) Microsoft Clarity for masked session replay. Prompt content is never sent. Read the privacy policy.