Developer · OpenAI

GPT-4.1 Token Counter & Cost Calculator

Use this GPT-4.1 token counter to see how many tokens a prompt uses and what it costs: $2.00 per million input tokens and $8.00 per million output tokens. Paste text below — it is counted in your browser and never uploaded.

0 tokens0 characters0 words
ModelInput tokensInput costOutput costPer callPer monthContext
GPT-4.1OpenAI0$0$0.004$0.004$1201.05M
GPT-5 nanoOpenAIcheapest≈0$0$0.0002$0.0002$6.00400k
Gemini 2.5 Flash-LiteGooglecheapest≈0$0$0.0002$0.0002$6.001M
GPT-6 LunaOpenAI≈0$0$0.00025$0.00025$7.50—
GPT-4o miniOpenAI0$0$0.0003$0.0003$9.00128k
GPT-5.6 LunaOpenAI≈0$0$0.0006$0.0006$18.00—
GPT-5 miniOpenAI≈0$0$0.001$0.001$30.00400k
Gemini 3.5 Flash-LiteGoogle≈0$0$0.00125$0.00125$37.501M
Gemini 2.5 FlashGoogle≈0$0$0.00125$0.00125$37.501M
Gemini 3.8 FlashGoogle≈0$0$0.001875$0.001875$56.251M
GPT-5.4 miniOpenAI≈0$0$0.00225$0.00225$67.50—
Claude Haiku 4.5Anthropic≈0$0$0.0025$0.0025$75.00200k
Gemini 3.5 FlashGoogle≈0$0$0.0045$0.0045$1351M
Claude Sonnet 5Anthropic≈0$0$0.005$0.005$1501M
GPT-6 SolOpenAI≈0$0$0.005$0.005$150—
GPT-4oOpenAI0$0$0.005$0.005$150128k
Gemini 2.5 ProGoogle≈0$0$0.005$0.005$1501M
GPT-5.6 TerraOpenAI≈0$0$0.006$0.006$180—
Gemini 3.1 Pro PreviewGoogle≈0$0$0.006$0.006$180200k
Claude Sonnet 4.6Anthropic≈0$0$0.0075$0.0075$2251M
Claude Opus 5.5Anthropic≈0$0$0.01$0.01$3001M
GPT-5.6 SolOpenAI≈0$0$0.01$0.01$300—
Claude Opus 5Anthropic≈0$0$0.0125$0.0125$3751M
GPT-5.5OpenAI≈0$0$0.015$0.015$450—
Claude Fable 5.1Anthropic≈0$0$0.025$0.025$7501M
GPT-6 AstraOpenAI≈0$0$0.025$0.025$750—

≈ marks a count estimated with OpenAI’s o200k_base encoding, because that model’s own tokenizer cannot run in a browser — the real figure can differ, and Anthropic notes its newer models produce roughly 30% more tokens than earlier ones. Exact counts are shown without ≈. Prices verified 2026-09-24.

Your text is tokenized in this browser and never uploaded.

GPT-4.1 pricing at a glance

  • Provider: OpenAI
  • Input: $2.00 per million tokens
  • Output: $8.00 per million tokens
  • Cached input: $0.50 per million tokens
  • Context window: 1,047,576 tokens
  • Prices verified: September 24, 2026

About GPT-4.1

GPT-4.1 is priced at $2 per million input tokens and $8 per million output, with cached input at $0.50 per million (a 75% discount). Its context window is about a million tokens, which is why a whole codebase or book can fit in one prompt. It uses o200k_base, so the counts on this page are exact for it.

What GPT-4.1 costs in practice

A call with 1,000 input tokens and 500 output tokens costs $0.006 on GPT-4.1, so a thousand such calls cost $6.00. With prompt caching, a cache read is priced at $0.50 per million tokens, 75% below the standard input rate. Its 1.05M-token context window holds roughly 786,000 English words, or about 1,571 pages at 500 words a page; filling all of it once costs $2.10 in input tokens.

How this GPT-4.1 token counter counts tokens

GPT-4.1 uses OpenAI’s o200k_base encoding, and this page runs that tokenizer in your browser, so the count shown is exactly what the API will bill for the prompt text.

How to use it

  1. Paste your prompt into the box, or drop a .txt or .md file on it.
  2. Set the expected output length and how many calls you make per day.
  3. Compare the cost per call and per month across models; the cheapest is highlighted.
  4. Tick the cache option if your prompt prefix is reused, then copy the table if you need it elsewhere.

Frequently asked questions

How many tokens is my text in GPT-4.1?

Paste it into the box above; the count shown for this model is exact because it uses the same o200k_base tokenizer the API applies.

How much does GPT-4.1 cost per million tokens?

$2.00 per million input tokens and $8.00 per million output tokens, with cached input at $0.50, as of September 24, 2026.

Is my prompt sent to a server?

No. Counting runs in a background thread in your browser. The site records only an anonymous counter such as how many models were compared, never the text you paste.

Prices verified September 24, 2026 from OpenAI’s pricing page. Confirm on the provider’s site before budgeting.