🌐 EN

🌀 Collatz Conjecture Calculator (3n+1 Problem)

Enter a positive integer and this calculator repeatedly applies "divide by 2 if even, triple and add 1 if odd" until it reaches 1, generating the full sequence, the number of steps taken, and the peak value reached.

Enter a positive integer from 1 to 10¹⁵. For safety, calculation is capped at 100,000 steps.

Results
Steps
Peak value
Sequence Graph
GUIDE

Learn more

01

What is the Collatz Conjecture (3n+1 Problem)?

The Collatz conjecture is a famous unsolved problem proposed in 1937 by German mathematician Lothar Collatz. For any positive integer n, repeat the following rule:

· If n is even, n ÷ 2
· If n is odd, 3n + 1

The conjecture states that repeating this process always eventually reaches 1, no matter the starting value. No counterexample has ever been found, yet it also has never been mathematically proven — making it one of the most famous open problems in mathematics.
02

Steps and Peak Value

The step count is the number of times the rule is applied (not counting the starting value itself) before reaching 1. For example, 27 reaches 1 in 111 steps, soaring as high as 9,232 along the way before coming back down. This unpredictable spike from small starting values is one of the most interesting features of Collatz sequences.
03

Why Are There Limits on Large Numbers?

The Collatz conjecture proposes that every positive integer eventually reaches 1 in finitely many steps, but this remains unproven, and some large inputs could theoretically require an extremely large number of steps. This calculator caps the starting value at 10¹⁵ and the number of steps at 100,000 to protect your browser from excessive load.

Frequently asked questions

Why does entering 27 give 111 steps?
The step count does not include the starting number itself — it only counts how many times the "divide by 2 if even, ×3+1 if odd" rule is applied until reaching 1. Starting from 27, this rule must be applied exactly 111 times to reach 1.
Why can't I calculate very large numbers?
Values above 10¹⁵, or values that don't reach 1 within 100,000 steps, are stopped and shown a message, to protect browser performance and safety. Most practical inputs are calculated comfortably within these limits.
Can I enter negative numbers or decimals?
No. The Collatz conjecture is only defined for positive integers (1 or greater), so negative numbers or decimals will show an error message.