Percentages and Math

Collatz Sequence Calculator

Enter a whole number to follow the Collatz rule, halve if even and triple plus one if odd, until it reaches 1.

Your numbers

A whole number from 1 up to 30 digits. Example value.

Result

Steps from 27 to 1

111

The highest value reached is 9,232.

Steps to reach 1
111
Highest value reached
9,232
Halving steps (even numbers)
70
Tripling steps (odd numbers)
41
Steps until a value falls below the start
96
Peak as a multiple of the start
341.93

The sequence

StepValue
027
182
241
3124
462
531
694
747
8142
971
10214
11107
12322
13161
14484
15242
16121
17364
18182
1991
20274
21137
22412
23206
24103
25310
26155
27466
28233
29700
30350
31175
32526
33263
34790
35395
361,186
37593
381,780
39890
40445
411,336
42668
43334
44167
45502
46251
47754
48377
491,132
50566
51283
52850
53425
541,276
55638
56319
57958
58479
591,438
60719
612,158
621,079
633,238
641,619
654,858
662,429
677,288
683,644
691,822
70911
712,734
721,367
734,102
742,051
756,154
763,077
779,232
784,616
792,308
801,154
81577
821,732
83866
84433
851,300
86650
87325
88976
89488
90244
91122
9261
93184
9492
9546
9623
9770
9835
99106
10053
101160
10280
10340
10420
10510
1065
10716
1088
1094
1102
1111
How this was calculated
  1. The rule: if the number is even, halve it. If it is odd, triple it and add 1. Repeat until you reach 1.
  2. Starting at 27, this takes 111 steps: 70 halvings and 41 triplings.
  3. Nobody has proved that every starting number reaches 1, although it has been checked by computer for a very large range. This tool follows the run and stops if it reaches 1.

Calculated using SumPanda.com · https://sumpanda.com/collatz-sequence-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the collatz sequence calculator

  1. Enter a starting number, any whole number from 1 up to 30 digits. Commas and spaces are ignored.
  2. Read the number of steps to reach 1, the highest value reached and how many steps were halvings and how many were triplings.
  3. See the step at which the sequence first falls below the number you started with.
  4. The table lists the first 200 values, and the downloaded CSV holds the whole run.

Formula

if n is even, the next number is n / 2

if n is odd, the next number is 3 x n + 1

repeat until the number is 1

steps = number of moves made; peak = the largest value on the way

The Collatz conjecture says every positive whole number reaches 1 this way. It has been checked by computer for a very large range, but it has not been proved.

The run from 27

Starting at 27 the sequence goes 27, 82, 41, 124, 62, 31, 94, and on, climbing to a peak of 9,232 before it finally falls to 1. It takes 111 steps, of which 70 are halvings and 41 are triplings. It first drops below 27 at step 96. Starting at 97 takes 118 steps and also peaks at 9,232, and 871 takes 178 steps and peaks at 190,996.

Small numbers can behave very differently from their neighbors: 7 takes 16 steps and peaks at 52, while 989,345,275,647 takes 1,348 steps and peaks at about 1.22 quadrillion. A 29-digit number, 12,345,678,901,234,567,890,123,456,789, takes 546 steps. Each of these counts was checked against a plain Python loop.

Why it is called a hailstone sequence

The values rise and fall in a wandering path, a bit like a hailstone rising and falling in a storm cloud before it lands. A long run of odd numbers makes the sequence climb fast, because each odd step more than triples the number, while each halving cuts it down. The balance of the two decides how long the run is.

What the tool can and cannot show

Following a sequence for one number proves nothing about all numbers, and this tool has no way of finding a counterexample, since none is known. It follows the run exactly with whole-number arithmetic, so even very large values are never rounded. If a run is too long to finish, the tool says so. For more number puzzles, try the Fibonacci Calculator or the Prime Number Calculator.

More tools for playing with numbers

For more number patterns and conversions, try the Egyptian Fraction Decomposer, Gray Code Converter and Digit Grouping Converter.

Assumptions and limits

  • The starting number is a whole number from 1 to 30 digits.
  • Each value is computed exactly with whole-number arithmetic, with no rounding.
  • The run stops when the value reaches 1 or when it passes the step limit of the tool.
  • The table shows the first 200 values only; the CSV file has the whole run.
  • The starting number in the form is an example. Try your own.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Is the Collatz conjecture proved?

No. It has been checked by computer for an enormous range of starting values and always reached 1, but no one has found a proof that it holds for every whole number.

What is the total stopping time?

It is the number of steps to reach 1, which is the main figure shown here. A related measure, the stopping time, is the number of steps until the value first drops below the starting number.

Why do so many different numbers reach the same peak?

Once two runs land on the same value they follow the same path from then on. 27 and 97 both pass through 9,232, which is why they share a peak.

Does it work for zero or negative numbers?

Not in the usual form. Zero never changes, and negative numbers fall into other loops that do not reach 1, so the tool asks for a positive whole number.