# OpenAI Token Counter and Token Calculator

> Count tokens for OpenAI models such as GPT-5, GPT-4.1, GPT-4o, the o-series, GPT-4 and embedding models, and estimate the cost.

Canonical URL: https://www.quizrise.com/token-counter

Markdown URL: https://www.quizrise.com/token-counter.md

Source type: Official QuizRise page summary

Reviewed by: Hilal Baydar

## Direct answer

The QuizRise Token Counter is a free tool that counts the tokens in a prompt the same way OpenAI models do, using OpenAI's tiktoken library. It shows one count per encoding: o200k_base for GPT-5, GPT-4.1, GPT-4o and the o-series reasoning models, cl100k_base for GPT-4, GPT-3.5 Turbo and embedding models, and gpt2. It also shows word and character counts and estimates cost from a price per 1M tokens that the user enters.

## Key facts

- In English, one token is about four characters, or about three quarters of a word.
- Models that share an encoding get the same token count for the same text.
- Cost is the token count divided by 1,000,000, times the price per 1M tokens; output tokens are billed separately.
- Prompts are not stored; they are only used to calculate the count.
- A Show tokens view colors each token of the o200k_base encoding (first 2,000 tokens); input is limited to 200,000 characters.

## Best for

- Developers estimating OpenAI API usage and cost.
- Writers checking prompt length against context limits.

## Supported inputs

- Any text or prompt

## Outputs

- Token counts per encoding
- Word and character counts
- Estimated cost

## Important limitations

- The chat API adds a few tokens per message for formatting, which plain text counts do not include.
- Prices change; the cost estimate uses the price the user enters.
