🔢 Collatz Conjecture Calculator
By ToolNimba Math Team · Updated 2026-06-19
Enter a positive whole number to build its Collatz sequence.
The Collatz Conjecture Calculator takes any positive whole number and follows the famous 3n+1 rule until it lands on 1. The rule is simple: if the current number is even, halve it; if it is odd, multiply by 3 and add 1. Enter a starting number and you will see the full sequence, how many steps it takes to reach 1, the highest value it climbs to along the way, and how many of the steps were halvings versus 3n+1 jumps.
What is the Collatz Conjecture Calculator?
The Collatz conjecture, also called the 3n+1 problem, the Ulam conjecture, or the hailstone problem, is one of the most famous unsolved questions in mathematics. Starting from any positive integer, you repeatedly apply a single rule: if the number is even, divide it by 2; if it is odd, replace it with 3 times the number plus 1. The conjecture claims that no matter which positive integer you start with, the sequence always eventually reaches 1 (after which it loops 4, 2, 1 forever). Despite being easy enough to explain to a child, no one has ever proved it true for every number, nor found a single counterexample.
The values are nicknamed hailstone numbers because, like hailstones in a cloud, they rise and fall many times before finally dropping to the ground (to 1). Some starting numbers settle quickly while others take a wild ride. A famous example is 27, which takes 111 steps and climbs all the way to a peak of 9232 before tumbling down to 1. The number of steps a starting value needs to reach 1 is called its total stopping time, and plotting these stopping times reveals a chaotic, fractal-like pattern.
Mathematicians have verified the conjecture by computer for every starting value up to roughly 2.95 times 10 to the 20th power, an astronomically large range, and every one of them reaches 1. This is strong evidence but not a proof: a conjecture is only settled when it is proved for all numbers or disproved by a counterexample. The legendary mathematician Paul Erdos said of the problem, "Mathematics may not be ready for such questions," and offered a cash prize for a solution. The conjecture remains open today, which is exactly why a calculator that lets you explore individual sequences is such a satisfying way to get a feel for the problem.
When to use it
- Exploring the 3n+1 problem for a class, a homework assignment, or pure curiosity.
- Checking the total stopping time (number of steps) and peak value for a specific starting number.
- Comparing how different starting numbers behave, for example how 6 settles in 8 steps while 27 takes 111.
- Demonstrating an unsolved mathematics problem in a way students can run themselves.
How to use the Collatz Conjecture Calculator
- Enter a positive whole number as the starting value.
- The calculator applies the Collatz rule: even numbers are halved, odd numbers become 3n+1.
- Read off the number of steps to reach 1, the highest value reached, and the even/odd step counts.
- View or copy the full sequence shown below the summary cards.
Formula & method
Worked examples
Start the sequence at 6.
- 6 is even, so 6 ÷ 2 = 3
- 3 is odd, so 3 × 3 + 1 = 10
- 10 is even, so 10 ÷ 2 = 5
- 5 is odd, so 5 × 3 + 1 = 16
- 16 → 8 → 4 → 2 → 1 (four more halvings)
- Sequence: 6, 3, 10, 5, 16, 8, 4, 2, 1
Result: 8 steps to reach 1, highest value 16
Start the sequence at 7.
- 7 is odd, so 7 × 3 + 1 = 22
- 22 → 11 → 34 → 17 → 52 → 26 → 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
- The full sequence has 17 terms
- The highest value reached along the way is 52
Result: 16 steps to reach 1, highest value 52
Collatz stopping time and peak value for small starting numbers
| Start | Steps to reach 1 | Highest value (peak) |
|---|---|---|
| 1 | 0 | 1 |
| 2 | 1 | 2 |
| 6 | 8 | 16 |
| 7 | 16 | 52 |
| 9 | 19 | 52 |
| 27 | 111 | 9232 |
| 97 | 118 | 9232 |
| 703 | 170 | 250504 |
Common mistakes to avoid
- Counting the starting number as a step. The number of steps is how many times the rule is applied to reach 1, not how many numbers are in the list. Starting at 6 gives a 9-term sequence but takes 8 steps, because the first term is the start itself.
- Thinking the conjecture has been proved. It has been checked by computer for every starting value into the hundreds of quintillions, but that is verification, not proof. The Collatz conjecture remains formally unproven for all positive integers.
- Expecting the sequence to only go down. Odd numbers trigger the 3n+1 rule, which makes the value jump up, often far above the start. The values rise and fall many times (hence hailstone numbers) before finally reaching 1.
- Starting from 0 or a negative number. The conjecture is stated for positive integers. Zero stays at zero, and negative numbers fall into different cycles, so the calculator only accepts whole numbers of 1 or more.
Glossary
- Collatz conjecture
- The claim that repeatedly applying the 3n+1 rule to any positive integer eventually reaches 1.
- 3n+1 rule
- The transformation: if n is even use n ÷ 2, and if n is odd use 3n + 1.
- Total stopping time
- The number of times the rule must be applied before the sequence first reaches 1.
- Hailstone numbers
- The values in a Collatz sequence, named because they rise and fall many times like hailstones before settling.
- Peak
- The highest value the sequence reaches before descending to 1.
Frequently asked questions
What is the Collatz conjecture?
The Collatz conjecture, also called the 3n+1 problem, says that if you start with any positive whole number and repeatedly halve it when even and replace it with 3n+1 when odd, you will always eventually reach 1. It is simple to state but has never been proved or disproved.
How do you calculate a Collatz sequence?
Start with your number. If it is even, divide by 2. If it is odd, multiply by 3 and add 1. Repeat this on each new result. Keep going until you reach 1. The list of values you pass through is the Collatz sequence.
Why is 27 a famous Collatz starting number?
Although 27 is small, its sequence is surprisingly long and wild: it takes 111 steps to reach 1 and climbs all the way up to a peak of 9232 before coming back down. It is a popular example because it shows how unpredictable the sequence can be.
Has the Collatz conjecture been solved?
No. It remains an open problem in mathematics. Computers have confirmed that every starting value up to roughly 2.95 times 10 to the 20th power reaches 1, but that is not a proof for all numbers, and no counterexample has ever been found.
What are hailstone numbers?
Hailstone numbers are the values that appear in a Collatz sequence. They get the name because, like hailstones tossed up and down inside a storm cloud, they rise and fall many times before finally dropping to 1.
Does every number reach 1?
That is exactly what the conjecture claims, and every number ever tested does reach 1. However, no one has proved it must hold for absolutely every positive integer, so strictly speaking it is still unproven.