Math · Sequences
Collatz conjecture calculator.
Apply halve-if-even, triple-plus-one-if-odd until you reach 1. See the step count, the highest value reached and the sequence itself.
Inputs
Sequence
Enter a whole number.
The 3x + 1 problem
Pick any positive whole number. If it is even, halve it; if it is odd, triple it and add 1. Repeat. The Collatz conjecture says you always reach 1, whatever you start with. No proof is known. Computer search has confirmed it for every start below 2075 x 2^60, roughly 2^71, as of the project page checked 15 October 2026 (Barina, J. Supercomput. 81, 810, 2025).
Worked example. 27 takes 111 steps to reach 1 (OEIS A006577) and climbs as high as 9,232 on the way: 27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, ... 97 takes 118 steps and also peaks at 9,232. Powers of two collapse straight down: 2^20 takes 20 steps.
Counting convention. A step is one application of the rule, so 1 takes 0 steps and 2 takes 1. This matches OEIS A006577. If this tool cannot reach 1 within 200,000 steps it stops and says so rather than looping forever; no start is known to do that.
Frequently asked questions
What is the Collatz conjecture?
The claim that repeatedly halving even numbers and replacing odd numbers x with 3x + 1 always reaches 1. It is unproven.
How many steps does 27 take?
111 steps, with a peak of 9,232 (OEIS A006577).
Has the Collatz conjecture been checked by computer?
Yes, for all starting values below about 2^71 (Barina, 2025). That is evidence, not a proof.
Why is it also called the 3x+1 or hailstone problem?
Because of the rule 3x + 1, and because the values rise and fall unpredictably like hailstones in a cloud.
What if my number never reaches 1?
No such number is known. This tool stops after 200,000 steps and reports it.
Sources
Checked
- OEIS A006577: steps to reach 1 in the 3x+1 problem
- Barina (2025), Improved verification limit for the convergence of the Collatz conjecture, J. Supercomput. 81, 810
- Collatz convergence verification project (D. Barina)
Step counts match OEIS A006577 for n = 1 to 30 in the test suite. The verification bound is from the cited paper and project page. Computed in your browser with exact BigInt arithmetic. Runs entirely in your browser. Nothing you type is sent or stored.
For learning
The Collatz conjecture is unproven. Results show the actual sequence for your input.