Collatz Conjecture

3n+1 trajectory length and step plot

even: n → n ÷ 2 | odd: n → 3n + 1 (repeat until n = 1)
Total steps
111
Peak value
9,232
Reached at step
77
Even steps (n ÷ 2)
70
Odd steps (3n + 1)
41
TrajectoryLine plot of the Collatz trajectory: value on the vertical axis against step number on the horizontal axis, starting at n and descending to 1.StepValue9,23201119,232

About this calculator

The Collatz Conjecture Calculator runs the 3n+1 process on any positive whole number: divide by two when even, multiply by three and add one when odd, and repeat until you reach 1. It reports the total number of steps, the peak value reached, and the even/odd step split, and plots the full trajectory so you can see the characteristic rises and falls of the 'hailstone' sequence.

Common examples

  • n = 6 → 6, 3, 10, 5, 16, 8, 4, 2, 1 (8 steps, peak 16)
  • n = 7 → 16 steps, peak 52
  • n = 27 → 111 steps, peak 9232 (a famously long climb)
  • n = 1 → 0 steps (already at the fixed point)