Intermediate

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.
A positive integer
Steps to reach 1
111

Stopping time of the sequence

Peak value
9,232
Sequence length
112
Even steps (n/2)
70
Odd steps (3n+1)
41
Sequence value by step
Full sequence
27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, … , 80, 40, 20, 10, 5, 16, 8, 4, 2, 1
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
n → n/2 if n is even; n → 3n + 1 if n is odd; repeat until n = 1
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

collatz calculator
3n+1 calculator
collatz conjecture
hailstone sequence
collatz sequence
3n plus 1

APA

TG we-Calculate Editorial Team. (2026). Collatz Conjecture Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/collatz-conjecture-calculator

Chicago

TG we-Calculate Editorial Team. "Collatz Conjecture Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/collatz-conjecture-calculator.

IEEE

TG we-Calculate Editorial Team, "Collatz Conjecture Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/collatz-conjecture-calculator

BibTeX

@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?