ToolPuma Logo

Context Window Calculator

Check how much of a model's context window is used.

Context window usage5,500 / 128k (4%)
122,500
Remaining space
16,384
Max safe output
Comfortable
Status

What Is a Context Window Calculator?

The Context Window Calculator determines how much of a model's context window your request consumes. Enter the system prompt, conversation history, and new input in tokens to see the remaining space and the maximum safe output length for the selected model.

How to Use This Context Window Calculator

  1. 1
    Pick a modelSelect the model with the relevant context window.
  2. 2
    Enter usageFill in system prompt, history, and input tokens.
  3. 3
    Read the resultSee remaining context and the maximum safe output.

Frequently Asked Questions

It is the maximum number of tokens a model can process in one turn, covering system prompt, history, user input, and generated output combined.
The model can only generate up to its max output, and it also cannot exceed the remaining context space. Planning both prevents truncation errors.
Use a token counter on each part of your conversation, or the provider's tokenizer, to get the numbers to enter here.