Pick a starting number: halve it if it is even, triple it and add 1 if it is odd, and repeat. The Collatz conjecture says you always reach 1. See the full sequence, how many steps it takes, how high it climbs and its hailstone graph, or find the longest sequences in a range.
Last updated:
What to calculate
Any positive whole number, even very large ones (up to 100 digits).
Enter your values to see the result.
Advertisement
Advertisement
How to use the Collatz Conjecture Calculator
Enter a starting number, for example 27.
Press Calculate to generate the sequence down to 1.
Read the step count and highest value.
Look at the hailstone chart; switch on the log scale for big numbers.
Try range mode to find which start below a limit takes the most steps.
The 3n + 1 rule
f(n) = n ÷ 2 if n is even, f(n) = 3n + 1 if n is odd
Repeat f until the value is 1. After 1 the sequence would loop 1 → 4 → 2 → 1 forever, so the calculation stops there. Example from 6: 6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1 (8 steps).
Notable starting numbers
Start
Steps to 1
Highest value
Note
7
16
52
9
19
52
27
111
9,232
Famous long sequence for a small start
97
118
9,232
Longest below 100
871
178
190,996
Longest below 1,000
6,171
261
975,400
Longest below 10,000
77,031
350
21,933,016
Longest below 100,000
837,799
524
2,974,984,576
Longest below 1,000,000
Frequently asked questions
What is the Collatz conjecture?
Start with any positive integer. If it is even, divide it by 2; if it is odd, multiply by 3 and add 1. The conjecture, posed by Lothar Collatz in 1937, says that this process always eventually reaches 1. It is also called the 3n + 1 problem, the Ulam conjecture or the hailstone problem.
Has the Collatz conjecture been proven?
No. It is one of the most famous unsolved problems in mathematics. It has been checked by computer for every starting number up to about 2⁶⁸ (roughly 3 × 10²⁰), and in 2019 Terence Tao proved that almost all starting values reach almost bounded values, but there is still no complete proof.
Why does 27 take so many steps?
Starting from 27, the sequence takes 111 steps to reach 1 and climbs as high as 9,232 along the way, even though it starts below 30. Small changes in the start can give very different sequences, which is part of what makes the problem hard.
What is a hailstone sequence?
It is another name for a Collatz sequence. The values rise and fall repeatedly, like a hailstone moving up and down in a cloud, before finally falling to 1.
What is the stopping time?
The total stopping time is the number of steps to reach 1. The (first) stopping time is the number of steps until the value first falls below the starting number. Proving that every number has a finite stopping time would prove the conjecture.
Which number below one million has the longest sequence?
837,799, which needs 524 steps to reach 1. Use range mode with 1,000,000 to see it and the other top starts.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.