DevBolt
Processed in your browser. Your data never leaves your device.
← Back to tools

LLM Token Counter & Cost Calculator

Count tokens and estimate API costs for GPT-4o, Claude, Gemini, and other LLMs. Uses BPE tokenization (cl100k_base).

0
Input Tokens
0
Est. Output Tokens
$0.00
Est. Total Cost
0.0%
Context Used (128K)
0
Characters
0
Words
0
Lines

Model Pricing Comparison

ModelInput $/1MOutput $/1MContext
$2.00$8.001M
$0.40$1.601M
$0.10$0.401M
$2.50$10.00128K
$0.15$0.60128K
$2.00$8.00200K
$1.10$4.40200K
$1.10$4.40200K
$15.00$75.00200K
$3.00$15.00200K
$0.80$4.00200K
$1.25$10.001M
$0.15$0.601M
$0.10$0.401M
$0.50$0.501M
$0.20$0.20524K
$2.00$6.00128K
$0.27$1.10131K
$0.55$2.19131K

About Token Counting

This tool uses BPE tokenization (cl100k_base encoding), which is the tokenizer used by GPT-4, GPT-4o, and GPT-4.1 models. Token counts for other providers (Anthropic, Google, Meta) are approximations — typically within 5-15% of actual counts.

Pricing reflects publicly listed API prices as of March 2026. Actual costs may vary with batch pricing, prompt caching, fine-tuned models, or volume discounts. Output tokens are estimated using your selected output:input ratio.

What is a token? Tokens are the basic units LLMs process text in. A token is roughly 3-4 characters or ¾ of a word in English. Code, non-English text, and special characters typically use more tokens per character.

Related Inspect Tools