Skip to content
Calculator

Collatz Conjecture Calculator

Compute the Collatz conjecture online — free and step by step. Show the 3n+1 sequence down to 1, the stopping time, and the peak value reached.

Quick answer
What is the Collatz conjecture?
Take a whole number n. If it's even, halve it (n/2); if it's odd, compute 3n + 1. Repeat. The Collatz conjecture says you always reach 1. The number of steps is the stopping time. Example: 6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1, so 8 steps. The starting number 27 takes 111 steps and rises as high as 9232 along the way.
The tool

Enter values — get full working

Comma or dot as decimal separator, negative values allowed.
Step-by-step
Press Calculate to see every step.
HowTo

Compute the Collatz sequence — step by step

Using the starting number 6
  1. 1
    Step 1 of 4

    Pick a starting number

    Begin with any positive whole number, e.g. 6.

  2. 2
    Step 2 of 4

    Check even or odd

    If even, divide by 2: 6 → 3. If odd, compute 3n + 1: 3 → 10.

  3. 3
    Step 3 of 4

    Repeat the steps

    Apply the rule again and again: 10 → 5 → 16 → 8 → 4 → 2 → 1.

  4. 4
    Step 4 of 4

    Count the steps

    Stop at 1. The number of steps is the stopping time — for 6 that's 8 steps.

Examples

Collatz conjecture — worked examples

Stopping time and peak value for various starting numbers
n = 6
6→3→10→5→16→8→4→2→1
8 steps
n = 7
7→22→11→34→…→1
16 steps
n = 11
11→34→17→52→…→1
14 steps
n = 16
16→8→4→2→1
4 steps
n = 27
27→82→41→…→1 (peak 9232)
111 steps
n = 1
already 1
0 steps
Theory

The Collatz conjecture — the 3n+1 problem

The Collatz conjecture, also called the 3n+1 problem or Ulam conjecture, is one of the most famous unsolved problems in mathematics. The rule could not be simpler: start with a positive whole number. If it's even, divide by 2; if it's odd, multiply by 3 and add 1. Repeat. The conjecture, stated by Lothar Collatz in 1937, claims that this sequence eventually reaches 1 for every starting number (then settling into the cycle 4 → 2 → 1). Despite its simple statement it remains unproven to this day — though it has been verified by computer for every starting number well beyond 2⁶⁸. Two quantities are of interest: the stopping time (the number of steps to reach 1) and the peak value (the largest value the sequence reaches along the way). Both fluctuate chaotically: 26 takes only 10 steps, yet its neighbour 27 takes 111 and climbs to 9232. The sequence shows how a trivial rule can produce highly complex behaviour — a favourite example of chaos in number theory.

Pitfalls

Common misunderstandings

Rule swapped

Even → halve, odd → 3n + 1. Reversing it gives a completely different (often non-terminating) sequence.

Confusing stopping time and peak

The stopping time is the number of steps; the peak is the largest value reached. For 27: 111 steps, but peak 9232.

Expecting it to fall steadily

The sequence does not decrease monotonically — it can rise sharply before finally reaching 1.

Starting with 0 or a negative number

The conjecture is for positive whole numbers. 0 and negatives are not defined here.
FAQ

Frequently asked questions about the Collatz conjecture

Glossary

Glossary — key terms explained simply

Collatz conjecture
Conjecture that the 3n+1 sequence always ends at 1.
Stopping time
Number of steps to reach 1.
Peak value
The largest value the sequence reaches along the way.
3n+1 rule
Odd number → multiply by 3 and add 1.
Iteration
Repeatedly applying the same rule.
Cycle 4→2→1
The final loop every sequence settles into.