GPT token counter

A closer look at your text, before you send a request.

12Tokens
52Characters
9Whitespace-separated words

Text stays in this browser. Plain text only; up to 20,000 UTF-16 characters. Chat formatting, tools, images, and output are not included.

What would these tokens cost?

Enter the rates for your chosen model. These are your estimates, not TokenRaft selling prices.

Estimated text cost per request--

Excludes caching, reasoning tokens, tools, multimodal inputs, taxes, and other provider charges. Actual billed usage can differ.

What is a GPT token?

A GPT token is a unit of content a model processes. Text is split into commonly occurring sequences of characters, so a token may contain an entire short word, part of a longer word, punctuation, or a leading space. It is not the same thing as a word, an API key, or a cryptocurrency.

For example, Hello, world! becomes four tokens with the o200k_base encoding. Changing punctuation, capitalization, or whitespace can change the count. Code, numbers, and text in different languages can also split differently.

OpenAI describes roughly four characters or three-quarters of an English word per token as a rule of thumb. This is useful for a quick estimate, but it is not a reliable way to count a specific prompt. A tokenizer applies the actual encoding vocabulary instead.

Choose the encoding, not just the word count.

This counter supports o200k_base and cl100k_base using the open-source gpt-tokenizer library. Different GPT model families can use different encodings. Check the encoding for your exact model before treating a result as a prompt estimate.

The result counts only the plain text you enter. A real GPT API request may also contain system instructions, message formatting, tool definitions, prior conversation turns, and non-text inputs. Those can add tokens beyond the text count shown here.

The text is processed locally in your browser. This page does not send your input to a model, create an API request, or store it in your browser's persistent storage.

How GPT token pricing works

Many text APIs quote separate rates per million input and output tokens. Input is the content sent to the model. Output is the content generated in response. Cached input may have a different rate, and some models or tools have additional billing categories.

Text cost = (input tokens × input rate + output tokens × output rate) ÷ 1,000,000

The calculator above uses the text's input count and your expected output length. You supply both rates; it does not assume that an official API price is the same as a gateway's selling price. For repeated calls, multiply the estimate by the expected number of requests.

Compare estimates with the actual usage returned by the API and the charges recorded by your provider. Reasoning tokens, cache behavior, tools, and other request-specific charges can make the final bill different.

Context length and output limits

A model's context window limits how much content it can process in one request. Conversation history uses part of that space each time it is included. The model may also impose a separate maximum output length.

To reduce token use, remove irrelevant repeated context, retrieve only the material needed for a question, and set an output limit suited to the task. Preserve instructions that matter for correctness; a shorter prompt is not useful if it causes failed requests or poor answers.

Prepare a GPT API request

GPT token questions

How many GPT tokens are in 1,000 words?

A rough English-language estimate is about 1,333 tokens. Actual counts depend on the text and encoding. Paste the text into the counter for a vocabulary-based count instead of relying on the word estimate.

Is this my final billable token count?

No. This is a plain-text count for the selected encoding. Request formatting and other content can add tokens, and the model's output is generated only when you make a request. The API's usage report and your provider's billing records determine the final charge.

Do I need an API key to use the counter?

No. The GPT token counter is free to use without an account or API key. An API key is needed separately when you connect an application to an API service.

References

OpenAI: tokens and key concepts gpt-tokenizer: encoding implementation

Reviewed September 8, 2026. Encoding choices do not imply model availability on TokenRaft.