Collatz conjecture calculator

This Collatz conjecture calculator shows the sequence for any starting number: the steps to reach 1, the highest value, the whole sequence and the longest sequences below a limit.

Example: Starting number n 27 · Record search up to 10,000 → Result: 27 reaches 1 after 111 steps. Source: Wikipedia – Collatz-Problem (3n+1-Vermutung). Updated: .

starting numbers up to this limit with the most steps
My ToolboxYour inputs are saved in this browser only.

Result

Result
27 reaches 1 after 111 steps
Key figures of the sequence
FigureValue
Steps to reach 1111
Highest value in the sequence9,232
reached at step77
Halvings (even numbers)70
3n+1 steps (odd numbers)41
Steps until the sequence drops below the start96
The sequence
27 → 82 → 41 → 124 → 62 → 31 → 94 → 47 → 142 → 71 → 214 → 107 → 322 → 161 → 484 → 242 → 121 → 364 → 182 → 91 → 274 → 137 → 412 → 206 → 103 → 310 → 155 → 466 → 233 → 700 → 350 → 175 → 526 → 263 → 790 → 395 → 1,186 → 593 → 1,780 → 890 → 445 → 1,336 → 668 → 334 → 167 → 502 → 251 → 754 → 377 → 1,132 → 566 → 283 → 850 → 425 → 1,276 → 638 → 319 → 958 → 479 → 1,438 → 719 → 2,158 → 1,079 → 3,238 → 1,619 → 4,858 → 2,429 → 7,288 → 3,644 → 1,822 → 911 → 2,734 → 1,367 → 4,102 → 2,051 → 6,154 → 3,077 → 9,232 → 4,616 → 2,308 → 1,154 → 577 → 1,732 → 866 → 433 → 1,300 → 650 → 325 → 976 → 488 → 244 → 122 → 61 → 184 → 92 → 46 → 23 → 70 → 35 → 106 → 53 → 160 → 80 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
Longest sequences up to the limit
Starting numberSteps
6,171261
9,257259
6,943256
7,963251
8,959246
It is not proven that every sequence reaches 1 – computers have checked all starting numbers up to about 2.95 · 10²⁰.

How it is calculated

The Collatz sequence halves even numbers and turns odd n into 3n+1 until it reaches 1. The starting number 27 needs 111 steps and climbs as high as 9232 on the way.

How it is calculated

n becomes n/2 if n is even, otherwise 3n+1. This repeats until 1 is reached (after which the cycle 1 → 4 → 2 → 1 would follow). The calculator uses arbitrarily large integers so intermediate values stay exact even for big starting numbers. It also searches below your limit for the starting numbers with the most steps; below 10,000 that is 6171 with 261 steps, below 1,000,000 it is 837,799 with 524 steps.

Good to know

Frequently asked questions

What is the Collatz sequence?

A sequence of numbers: if the number is even, halve it; if it is odd, multiply by 3 and add 1. The conjecture says you always arrive at 1.

How many steps does 27 take?

111 steps, climbing as high as 9232. That is unusually long for such a small starting number.

Is the Collatz conjecture proven?

No. It has been confirmed by computer for all starting numbers beyond 2 · 10²⁰, but there is no general proof.

Which starting number below one million has the longest sequence?

837,799 with 524 steps.

Sources and legal basis

As of: · Editorial policy

Related tools