Collatz sequence calculator

Enter a positive whole number. The calculator halves even numbers and turns odd ones into 3n + 1 until it reaches 1, then reports the number of steps, the highest value reached, the odd and even steps and the sequence itself.

A positive whole number of up to 40 digits.
Steps to reach 1111
Highest value
9232
Step where the highest value first occurs
77
Odd steps (3n + 1)
41
Even steps (÷ 2)
70
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, …

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter a positive whole number.
  2. Read the number of steps and the highest value.
  3. The sequence list shows the first terms; the copy button copies all of them.

How it works

The rule is n → n/2 if n is even and n → 3n + 1 if n is odd. The calculator stops at 1. If the sequence has not reached 1 after 100000 steps it stops with a message; no starting number is known to do that.

Worked example

Start at 6:

  • 6, 3, 10, 5, 16, 8, 4, 2, 1
  • 8 steps: 2 odd (3 and 5), 6 even
  • Highest value: 16

Tips

  • Commas, spaces and underscores in the number are ignored.
  • Different starting numbers can merge: 6 and 12 share every term from 6 onward.

Frequently asked questions

What is the Collatz conjecture?

Start with any positive whole number. If it is even, halve it; if it is odd, triple it and add 1. The conjecture says you always reach 1. It has been checked for very large numbers but has not been proved.

What are steps and peak value?

Steps count the moves needed to reach 1. The peak is the largest number on the way. Starting at 27 takes 111 steps and peaks at 9232.

Does a power of two behave specially?

Yes. Every move is a halving, so 2 to the power k reaches 1 in exactly k steps.

Why does the calculator use big integers?

Terms can grow far beyond the safe range of ordinary numbers, and any rounding would give a wrong sequence. Exact integers keep every term correct.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.