OpenAI charges per token, and counting them before you send a prompt saves money and surprises. For exact counts in production code, use tiktoken. For one-off checks — sizing prompts, estimating cost, fitting documents in the context window — a browser-based counter is faster.
The counter handles GPT-3.5, GPT-4, GPT-4o, GPT-4o mini, GPT-4.1, GPT-4.1 mini, GPT-4.1 nano, and the o-series reasoning models. No OpenAI account needed.
Count GPT-4 tokens free in your browser. No signup.
Open Token Counter →| Model | Input ($/M) | Output ($/M) | Context window |
|---|---|---|---|
| GPT-4.1 nano | $0.10 | $0.40 | 128K |
| GPT-4o mini | $0.15 | $0.60 | 128K |
| GPT-4.1 mini | $0.40 | $1.60 | 128K |
| GPT-4.1 | $2.00 | $8.00 | 128K |
| GPT-4o | $2.50 | $10.00 | 128K |
| o3 mini | $1.10 | $4.40 | 128K |
| o4 mini | $1.10 | $4.40 | 128K |
| o3 | $10.00 | $40.00 | 128K |
The price spread between the cheapest and most expensive OpenAI model is 100x. For most prompts, GPT-4o mini is good enough at 1/17th the cost of GPT-4o.
| Prompt type | Approximate tokens | Cost on GPT-4o | Cost on GPT-4o mini |
|---|---|---|---|
| Short question | 15 | $0.00004 | $0.000002 |
| ChatGPT-style chat (with history) | 800 | $0.002 | $0.00012 |
| 1-page article to summarize | 350 | $0.00088 | $0.000053 |
| 10-page report to summarize | 3,500 | $0.0088 | $0.00053 |
| Code file to refactor | 2,500 | $0.0063 | $0.00038 |
| Long context (full novel) | 100,000 | $0.25 | $0.015 |
Even an entire novel is 25 cents on GPT-4o or 1.5 cents on GPT-4o mini. The cost of GPT API calls is genuinely tiny for most personal use.
Use tiktoken (Python or JavaScript library) when:
Use the browser counter when:
If your token counts are higher than budget, the fastest reductions:
Test each change with the Token Counter to see exactly how many tokens you saved.
Count GPT-4 tokens and trim prompts in your browser.
Open Token Counter →