Collatz Conjecture Calculator
Enter any positive whole number to build its Collatz (3n+1) sequence and see how many steps it takes to fall to 1.
Stopping time of the sequence
How does this calculator work?
The Collatz sequence repeatedly halves even numbers and turns odd numbers into 3n+1 until it reaches 1. This tool counts the steps (stopping time), finds the peak value, and lists the full hailstone sequence for any positive integer you enter, using exact BigInt math.
Formula
How this is calculated
The Collatz process starts from a positive integer n. At each step, if n is even it is halved, and if n is odd it is replaced by 3n + 1. The rule is applied repeatedly, producing a chain of values often called a hailstone sequence because the numbers rise and fall before eventually dropping to 1.
This calculator reports the total stopping time (how many steps are needed to reach 1), the peak value (the largest number the sequence reaches), the full sequence, and a breakdown of how many even and odd operations occurred. Calculations use arbitrary-precision integers (BigInt) so that large intermediate peaks are exact rather than rounded.
The Collatz Conjecture states that every positive integer eventually reaches 1, but this remains unproven. The calculator therefore caps the loop at a very large number of steps as a safety guard; in practice every tested starting value terminates far sooner. The input must be a positive whole number, so fractions, zero, and negatives are rejected. The area chart plots each value against its step index, making the characteristic spikes easy to see.
Frequently asked questions
It is the unproven claim that, starting from any positive integer and repeatedly applying n/2 when even and 3n+1 when odd, you always eventually reach 1.
Starting at 27 the sequence climbs to a peak of 9232 and takes 111 steps to reach 1, showing how a small number can produce a long, dramatic hailstone path.
Yes. The sequence uses arbitrary-precision BigInt arithmetic, so peak values are computed exactly even when they grow much larger than the starting number.
Also known as
TG we-Calculate Editorial Team. (2026). Collatz Conjecture Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/collatz-conjecture-calculator
TG we-Calculate Editorial Team. "Collatz Conjecture Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/collatz-conjecture-calculator.
TG we-Calculate Editorial Team, "Collatz Conjecture Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/collatz-conjecture-calculator
@misc{wecalculate_collatz_conjecture_calculator, title = {Collatz Conjecture Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/collatz-conjecture-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
