GPT-4.1 Token Counter & Cost Calculator

Count tokens for GPT-4.1 and estimate the exact API cost — $2.00 per 1M input tokens, $8.00 per 1M output tokens — using a real o200k_base BPE tokenizer. Everything runs in your browser; nothing is uploaded.

0
tokens (o200k_base)
0
characters
0
words
$0
input cost
$0
output cost (est.)
$0
total per request

Counts are exact for OpenAI models (o200k_base is GPT-4o/4.1/5's tokenizer). For Claude, Gemini and other vendors — whose tokenizers are not public — treat the count as a close estimate (typically within ±15%).

Cost of this text across popular models

Exact: o200k_base is OpenAI's own tokenizer, the same encoding its API bills GPT-4.1 against.

Cost lookup — GPT-4.1

TokensCost on GPT-4.1
1K input tokens0.2¢
10K input tokens$0.0200
100K input tokens$0.2000
1M input tokens$2.00
1K output tokens0.8¢
10K output tokens$0.0800

FAQ

How accurate is the GPT-4.1 token count?

Exact: o200k_base is OpenAI's own tokenizer, the same encoding its API bills GPT-4.1 against. Paste your own text above to see the exact number for your prompt.

How is GPT-4.1 API cost calculated?

Cost = (input tokens ÷ 1,000,000) × $2.00 + (output tokens ÷ 1,000,000) × $8.00 — GPT-4.1's official per-1M-token prices from Artificial Analysis.

See full GPT-4.1 pricing & benchmarks, or the main token counter for every model.