Collatz Conjecture Calculator
Enter any positive integer and this calculator generates the complete Collatz hailstone sequence for that number, showing every step until the sequence reaches 1. You get the total number of steps (stopping time), the highest value the sequence ever reaches, and an interactive step-by-step breakdown table. The chart below visualises how the sequence rises and falls before collapsing to 1.
What is the Collatz conjecture?
The Collatz conjecture, also called the 3n+1 problem or the hailstone conjecture, is one of the most famous unsolved problems in mathematics. It was proposed by the German mathematician Lothar Collatz in 1937. The rule is disarmingly simple: take any positive integer. If it is even, divide it by 2. If it is odd, multiply it by 3 and add 1. Repeat this process with the resulting number. The conjecture states that no matter which positive integer you start with, the sequence will always eventually reach 1. Despite its simple statement, no one has ever proved this is true for all starting numbers, and no counterexample has been found either. Mathematicians have verified the conjecture computationally for every integer up to around 2^68, but a general proof remains elusive.
How to use this calculator
Type any positive integer into the "Starting number" field and the calculator will immediately generate the complete hailstone sequence for that number. The results panel shows the stopping time (the number of steps before reaching 1), the peak value (the highest number the sequence visits), the total sequence length (including the starting number and the final 1), and a breakdown of how many even and odd steps were taken. The sequence chart visualises the jagged rise-and-fall pattern that gives the sequence its "hailstone" name. The step-by-step table below the chart lists every single iteration so you can follow exactly which rule was applied at each point.
Why are stopping times so unpredictable?
One of the most striking features of the Collatz sequence is how dramatically stopping times can vary for consecutive integers. For example, the number 26 reaches 1 in just 10 steps, while its neighbour 27 takes 111 steps and shoots all the way up to 9232 before eventually collapsing. This extreme sensitivity to the starting value makes the conjecture hard to analyse with standard mathematical tools. The sequence behaves somewhat like a pseudorandom process, and its connection to number theory, dynamical systems, and even fractal geometry has attracted researchers across many fields. The "hailstone" nickname captures this behaviour well: just as hailstones rise and fall unpredictably inside a storm cloud before finally hitting the ground, Collatz sequences bounce up and down before inevitably landing on 1 - if the conjecture is true.
Even steps, odd steps and the ratio
A useful way to analyse any Collatz sequence is to count how many times the even rule (n/2) was applied versus the odd rule (3n+1). On average, about two-thirds of all steps are halving steps and one-third are tripling steps. This is because after applying 3n+1 to an odd number, the result is always even, so the very next step will be a halving step. This 2:1 ratio means the geometric effect of the two rules almost cancels out: two halvings multiply the value by 1/4, while one tripling multiplies it by roughly 3, giving a net factor of about 3/4 per pair. This is why the sequence tends to drift downward over time, even though it can spike dramatically in the short term.
Notable Collatz sequences and stopping times
| Starting number (n) | Steps to reach 1 | Peak value |
|---|---|---|
| 2 | 1 | 2 |
| 3 | 7 | 16 |
| 6 | 8 | 16 |
| 7 | 16 | 52 |
| 11 | 14 | 52 |
| 12 | 9 | 16 |
| 27 | 111 | 9232 |
| 97 | 118 | 9232 |
| 100 | 25 | 200 |
| 871 | 178 | 190996 |
| 6171 | 261 | 975400 |
| 77031 | 350 | 21933016 |
Selected starting values and their stopping times (steps to reach 1). Stopping times can vary dramatically for consecutive integers.
Frequently asked questions
Has the Collatz conjecture been proved?
No. As of 2026 the Collatz conjecture remains unproved. It is one of the most famous open problems in mathematics. Terence Tao published a landmark 2019 paper showing that "almost all" starting numbers eventually reach a value close to 1, but a complete proof for all positive integers has not been found.
What is a hailstone sequence?
A hailstone sequence is another name for a Collatz sequence. The name comes from the way the numbers rise and fall erratically before eventually landing on 1, just like hailstones that bounce up and down inside a storm cloud before falling to the ground.
What is the stopping time?
The stopping time (also called the total stopping time) is the number of steps required to reach 1 starting from a given positive integer. For example, starting from 6 the sequence is 6, 3, 10, 5, 16, 8, 4, 2, 1, which takes 8 steps, so the stopping time for 6 is 8.
Which starting number has the longest known stopping time?
Among numbers up to one billion, the starting value with one of the highest stopping times is 837799, which takes 524 steps to reach 1. For numbers up to 100, the champion is 97 with 118 steps. Longer stopping times are regularly found for larger starting values.
Can the Collatz sequence work for negative integers?
The Collatz rules can be applied to negative integers too, but the behaviour is different. Negative starting values do not always converge to -1: there are three known cycles at -1, -5, and -17, rather than a single termination point. This calculator uses only positive integers as intended by the original conjecture.
Why does the sequence always seem to reach 1?
No one knows for certain, which is why it is still a conjecture. One intuition is that on average the sequence trends downward: the even rule halves the number, and while the odd rule triples it and adds 1, the result is always even so it is immediately halved again. The net effect of one odd step followed by one even step is roughly multiplication by 3/2, but two out of every three steps on average are halving steps, giving a long-run downward drift.