# Next Token Probability

- **Canonical URL:** https://getaimath.com/dictionary/next-token-probability/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is Next Token Probability?

**In one sentence:** Next token probability is the chance a model gives to a specific token being the next one in the text.

For each step of writing, the model estimates how likely every token is to come next. The token with the highest probability is the model's best guess, but sampling might still pick a less likely one. Very low probabilities for all options can mean the model is unsure.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Next Token Probability?

After "2 + 2 =," a good model gives the token "4" a probability close to 100%.

## Why does Next Token Probability matter?

These probabilities show how confident a model is and help detect when it might be guessing.

## Related Concepts

- [Probability Distribution](https://getaimath.com/dictionary/probability-distribution/): A probability distribution is a list of every possible outcome with the chance of each one happening, adding up to 100%.
- [Sampling](https://getaimath.com/dictionary/sampling/): Sampling is how a model picks the next token from its list of possible options, using their probabilities.
- [Softmax](https://getaimath.com/dictionary/softmax/): Softmax is a math function that turns a list of raw scores into probabilities that add up to 100%.
- [Deterministic Generation](https://getaimath.com/dictionary/deterministic-generation/): Deterministic generation means the model gives the exact same output every time for the same input.
- [Logits](https://getaimath.com/dictionary/logits/): Logits are the raw scores a model gives every possible next token before they are turned into probabilities.
- [Repetition Penalty](https://getaimath.com/dictionary/repetition-penalty/): A repetition penalty is a setting that makes a model less likely to repeat the same words or phrases over and over.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/next-token-probability/)
