Runs entirely in your browser

Free Token Counter and API Cost Estimator

Paste your text to see its token count and what it costs on each major model. Nothing leaves your browser.

Presets fill in realistic example text plus a matching reply length and monthly volume, so the numbers below aren't a guess from zero.

98
Tokens
67
Words
437
Characters
$0.0264
Per request · GPT-5.6 Sol
$5.28
Per month · 200 req
Cheapest: Gemini 2.5 Flash-Lite — $0.1060/moPriciest: GPT-5.4 Pro — $47.39/mo
Token breakdown (visual, approximate)
Write a 900-word blog post explaining how content delivery networks reduce latency for global audiences. Cover edge caching, anycast routing, origin shielding, and give one concrete example of a traffic spike scenario where a CDN prevents an outage. Keep the tone practical and developer-facing, avoid marketing language, and close with three actionable checks a site owner can run this week to confirm their CDN is configured correctly.

Output tokens are billed at 4-6x the input rate on most models — this number moves cost more than the prompt itself.

Turns a single prompt's cost into a realistic monthly bill for budgeting.

The link only carries your output-token, volume, currency and model settings — never the text you pasted.

How this is calculated

(input tokens ÷ 1M × input rate) + (output tokens ÷ 1M × output rate), then × your monthly requests.

(98 ÷ 1e6 × 4) + (1,300 ÷ 1e6 × 20) = $0.0264 / request
$0.0264 × 200 = $5.28 / month on GPT-5.6 Sol

Recommendation

Switching to Gemini 2.5 Flash-Lite is roughly 98% cheaper at this volume ($5.28 → $0.1060/mo) — worth it if the task doesn't need GPT-5.6 Sol's extra reasoning quality.

Why token counts matter

Every LLM API bills and limits by tokens, not characters or words.

Fit a context window

Check whether a document or chat history fits inside a model's limit.

Budget an API call

Turn a token count into a dollar estimate before you send it.

Compare models

The same prompt can cost 10x more or less by provider.

Trim bloated prompts

Spot instructions quietly eating your budget.

How tokens matter across the tools you use

Token usage shows up differently depending on the AI tool you're in.

ChatGPT / OpenAI API

Every request and reply is billed by input and output tokens separately. Long system prompts and chat history stack up fast.

Claude

Large document and codebase uploads are where token counts spike — cached reads make repeat context cheaper.

Gemini

Multimodal input (images, video, long PDFs) gets converted into tokens too, so one attachment can dominate a request's cost.

Cursor

Token usage comes from agent actions reading your codebase — a multi-file refactor can burn more tokens than the prompt suggests.

DeepSeek

Off-peak and peak pricing can differ by roughly 2x on the same model, so token usage that looks cheap at 3am can cost noticeably more during business hours.

How to use this counter

1

Paste your text

Any prompt, code block, JSON payload, or transcript works.

2

Read the live counts

Tokens, words, and characters update as you type — nothing leaves your browser.

3

Set output length & volume

Turns a single prompt's cost into a real monthly bill estimate.

4

Check the cost table

Sorted and highlighted so the cheapest and priciest models jump out immediately.

Model pricing, side by side

Rates per 1M tokens. Estimated monthly cost updates live against your text, output length, and volume above.

Teal row = cheapest, orange row = most expensive within the selected tab, at your current volume.

Newest flagship, rolling out. Long context after 272K input: input $20, cache read $2, output $75
OpenAI
Input
$10.000
Cache read
$1.000
Output
$50.00
Context / Max out1,050K / 128K
Est. monthly$13.20
Promotional rate cut ~20% on 21 Aug 2026, guaranteed at least through 21 Nov 2026 (list price is $5/$30)
OpenAI
Input
$4.000
Cache read
$0.400
Output
$20.00
Context / Max out1,050K / 128K
Est. monthly$5.28
Balanced mid-tier option
OpenAI
Input
$2.000
Cache read
$0.200
Output
$12.00
Context / Max out1,050K / 128K
Est. monthly$3.16
Lightweight, high-volume tasks
OpenAI
Input
$0.200
Cache read
$0.020
Output
$1.20
Context / Max out1,050K / 128K
Est. monthly$0.3159
Security & enterprise-focused variant
OpenAI
Input
$12.500
Cache read
$1.250
Output
$75.00
Context / Max out1,050K / 128K
Est. monthly$19.74
Previous flagship generation
OpenAI
Input
$5.000
Cache read
$0.500
Output
$30.00
Context / Max out1,050K / 128K
Est. monthly$7.90
Extended reasoning, premium tier
OpenAI
Input
$30.000
Cache read
Not offered
Output
$180.00
Context / Max out1,050K / 128K
Est. monthly$47.39
Prior-generation standard model
OpenAI
Input
$2.500
Cache read
$0.250
Output
$15.00
Context / Max out1,050K / 128K
Est. monthly$3.95
Compact, cost-efficient
OpenAI
Input
$0.750
Cache read
$0.075
Output
$4.50
Context / Max out400K / 128K
Est. monthly$1.18
Smallest, cheapest OpenAI tier
OpenAI
Input
$0.200
Cache read
$0.020
Output
$1.25
Context / Max out400K / 128K
Est. monthly$0.3289
Prior-gen premium reasoning
OpenAI
Input
$30.000
Cache read
Not offered
Output
$180.00
Context / Max out1,050K / 128K
Est. monthly$47.39
Built for agentic coding tasks
OpenAI
Input
$1.250
Cache read
$0.130
Output
$10.00
Context / Max out1,050K / 128K
Est. monthly$2.62
Deep reasoning workloads
OpenAI
Input
$15.000
Cache read
Not offered
Output
$120.00
Context / Max out1,050K / 128K
Est. monthly$31.49
Current generation; cache reads 75% cheaper than Fable 5 (0.025x input, vs the standard 0.1x)
Anthropic
Input
$10.000
Cache read
$0.250
Output
$50.00
Context / Max out1M / 128K
Est. monthly$13.20
Same model as Fable 5.1 with relaxed cyber/biosafety limits — invite-only
Anthropic
Input
$10.000
Cache read
$0.250
Output
$50.00
Context / Max out1M / 128K
Est. monthly$13.20
Prior generation, superseded by Fable 5.1
Anthropic
Input
$10.000
Cache read
$1.000
Output
$50.00
Context / Max out1M / 128K
Est. monthly$13.20
Prior generation, superseded by Mythos 5.1
Anthropic
Input
$10.000
Cache read
$1.000
Output
$50.00
Context / Max out1M / 128K
Est. monthly$13.20
Balanced flagship
Anthropic
Input
$2.000
Cache read
$0.200
Output
$10.00
Context / Max out1M / 128K
Est. monthly$2.64
High-capability analysis
Anthropic
Input
$5.000
Cache read
$0.500
Output
$25.00
Context / Max out1M / 128K
Est. monthly$6.60
Enterprise-grade workflows
Anthropic
Input
$5.000
Cache read
$0.500
Output
$25.00
Context / Max out1M / 128K
Est. monthly$6.60
Prior-gen balanced model
Anthropic
Input
$3.000
Cache read
$0.300
Output
$15.00
Context / Max out1M / 128K
Est. monthly$3.96
Fast, lightweight tasks
Anthropic
Input
$1.000
Cache read
$0.100
Output
$5.00
Context / Max out200K / 64K
Est. monthly$1.32
Newest fast-tier model. Introductory rate through 31 Dec 2026, then doubles to $1.50/$7.50
Google
Input
$0.750
Cache read
$0.075
Output
$3.75
Context / Max out1,048K / 65K
Est. monthly$0.9897
Introductory rate through 31 Dec 2026, then doubles to $1.50/$7.50
Google
Input
$0.750
Cache read
$0.075
Output
$3.75
Context / Max out1,048K / 65K
Est. monthly$0.9897
Introductory rate through 31 Dec 2026, then doubles to $1.50/$7.50
Google
Input
$0.750
Cache read
$0.075
Output
$3.75
Context / Max out1,048K / 65K
Est. monthly$0.9897
Multimodal grounding support
Google
Input
$1.500
Cache read
$0.150
Output
$9.00
Context / Max out1,048K / 65K
Est. monthly$2.37
Built for high-volume jobs
Google
Input
$0.300
Cache read
$0.030
Output
$2.50
Context / Max out1,048K / 65K
Est. monthly$0.6559
Preview-tier reasoning model
Google
Input
$2.000
Cache read
$0.200
Output
$12.00
Context / Max out1,048K / 65K
Est. monthly$3.16
Cost-efficient multimodal
Google
Input
$0.250
Cache read
$0.025
Output
$1.50
Context / Max out1,048K / 65K
Est. monthly$0.3949
Prior-gen flagship reasoning
Google
Input
$1.250
Cache read
$0.125
Output
$10.00
Context / Max out1,048K / 65K
Est. monthly$2.62
Configurable thinking budget
Google
Input
$0.300
Cache read
$0.030
Output
$2.50
Context / Max out1,048K / 65K
Est. monthly$0.6559
Lowest-cost Gemini tier
Google
Input
$0.100
Cache read
$0.010
Output
$0.40
Context / Max out1,048K / 65K
Est. monthly$0.1060
Off-peak rate — peak ≈2x higher. Thinking/non-thinking modes, tool calls
DeepSeek
Input
$0.220
Cache read
$0.007
Output
$0.66
Context / Max out1M / 384K
Est. monthly$0.1759
Off-peak rate — peak ≈2x higher. Higher-precision reasoning
DeepSeek
Input
$0.660
Cache read
$0.022
Output
$1.98
Context / Max out1M / 384K
Est. monthly$0.5277
Off-peak rate — peak ≈2x higher. Experimental vision-token support
DeepSeek
Input
$0.220
Cache read
$0.007
Output
$0.66
Context / Max out1M / 384K
Est. monthly$0.1759
Current flagship. Long context ≥200K input tokens: input $4, cache $1, output $12
xAI
Input
$2.000
Cache read
$0.500
Output
$6.00
Context / Max out500K
Est. monthly$1.60
Mid-tier, largest context window in the lineup. Long context ≥200K input tokens: input $2.50, cache $0.40, output $5
xAI
Input
$1.250
Cache read
$0.200
Output
$2.50
Context / Max out1M
Est. monthly$0.6745
Coding-focused, cheapest xAI tier. Long context ≥200K input tokens: input $2, cache $0.40, output $4
xAI
Input
$1.000
Cache read
$0.200
Output
$2.00
Context / Max out256K
Est. monthly$0.5396
Base web-search model. Excludes the $5-$12 per 1K request search fee
Perplexity
Input
$1.000
Cache read
Not offered
Output
$1.00
Context / Max out127K
Est. monthly$0.2796
Adds reasoning before answering. Excludes the $6-$14 per 1K request search fee
Perplexity
Input
$2.000
Cache read
Not offered
Output
$8.00
Context / Max out128K
Est. monthly$2.12
Highest-quality search answers. Excludes the $6-$14 per 1K request search fee
Perplexity
Input
$3.000
Cache read
Not offered
Output
$15.00
Context / Max out200K
Est. monthly$3.96
Cursor (Auto / Composer)

Bills at the routed model's own rate above, plus a $0.25/1M token platform fee on Teams & Enterprise.

Rate comparison, highest to lowest

All providers — Input, cache read, and output rates per 1M tokens.

What actually goes into a request

Four pieces typically make up what you're billed for on any given call. Knowing which one is growing tells you what to trim first.

System prompt

The fixed instructions sent with every call — tone, rules, output format. It's billed on every single request even though it never changes.

e.g. "You are a support agent. Reply in under 100 words, always offer a refund or reship."

Trap: letting the system prompt grow unchecked over months of tweaks — it's the easiest place to save cost with caching or trimming.

User input

The part that actually changes per call — the question, the document, the ticket text. This is what most people mean when they say "my prompt."

e.g. the customer's message, a pasted contract, a code diff.

Trap: pasting an entire document when only one section is relevant — every extra paragraph is billed.

Retrieved context (RAG)

Extra chunks of text pulled in from a knowledge base or search step and stuffed into the prompt before it reaches the model.

e.g. 5 document snippets retrieved for a Q&A bot.

Trap: retrieving more chunks than the model needs "just in case" — often the largest, least-controlled cost driver.

Output / completion

What the model generates back. It's billed separately from input, usually at 4-6x the input rate on the same model.

e.g. a 400-word drafted reply, a JSON object, a summary.

Trap: not capping max output length — a model that rambles costs more than one instructed to be concise.

Worked example: a support bot handling 12,000 tickets/month

Say each ticket sends roughly 350 input tokens (a short system prompt plus the customer's message) and gets back 220 output tokens. On Claude Haiku 4.5 that's (350 ÷ 1e6 × $1) + (220 ÷ 1e6 × $5) ≈ $0.00135 per ticket. Multiplied by 12,000 tickets, that's roughly $16.20/month — small enough that the team could safely upgrade to a stronger model for the ~5% of tickets that get escalated, without materially changing the bill. This is exactly the trade-off the recommendation card above is built to surface for your own numbers.

Common mistakes when estimating cost

  • • Forgetting output tokens usually cost several times more than input tokens.
  • • Not separating cached vs. uncached input pricing when a prompt repeats often.
  • • Assuming 1 word ≈ 1 token — this varies a lot by language, code, and formatting.
  • • Ignoring long-context pricing tiers that kick in above a certain input size on some models.
  • • Comparing sticker price per model without weighting it by real request volume.

Want the full breakdown for a specific provider?

Cache-read pricing, context window vs. max output, long-context tiers, and reasoning-effort cost — plus a model-by-model comparison table — live on the dedicated guide for each provider so they can go deeper than a homepage summary can.

Glossary of billing terms

Token
The smallest unit of text a model processes and bills by — a sub-word chunk, not a whole word.
Input tokens
Everything sent to the model: system prompt, history, retrieved context, and your message.
Output tokens
What the model generates back. Billed separately, usually at several times the input rate.
Cache read
A discounted rate for input text the model has already processed recently and can reuse.
Context window
The combined input + output token budget a single request can use.
Max output
A separate cap on how many tokens one response can contain, regardless of context window size.
Long-context tier
A higher per-token rate that applies once input crosses a provider-specific size threshold.
Rate limit
A cap on requests or tokens per minute, separate from and in addition to per-token pricing.

Replit Credit Estimator

Replit doesn't bill by tokens — it charges a fixed rate per action ("checkpoint"), win or fail.

$0.00
Agent cost
$0.00
Assistant cost
$0.00
Total est.
Cost breakdown (not token-based)
AgentAssistant

Building a new app

Scaffolding touches many files — expect a high Agent checkpoint count.

Debugging errors

Failed attempts still bill — five retries cost five checkpoints.

Quick edits

Small single-file changes usually route through cheaper Assistant checkpoints.

Large refactors

Multi-file Agent work is where monthly credit pools disappear fastest.

100% Free

Embed This Calculator on Your Site

Add a live token counter to your own blog or app in one line of code — free, no signup, no branding removed.

HTML
<iframe src="https://apextechjournal.com/widget/token-counter.html" width="100%" height="280" style="border:none; border-radius:10px;"></iframe>

Common questions