DataToolsLab
Number Theory & Statistics Calculators

Collatz Calculator

Trace the Collatz sequence for any starting number.

Loading tool…

What is Collatz?

The Collatz rule is simple: an even number halves, an odd number triples and adds one, and the conjecture — open since 1937 — is that every starting value eventually reaches 1. The interesting number is usually the peak: 27 takes 111 steps and climbs to 9,232 first, which is why a small input can produce a long trace.

How it works

The sequence is traced term by term, counting steps and tracking the largest value reached. Every starting value ever tested does reach 1 — checked by computer to about 2⁶⁸ — but that is evidence, not proof, so the engine stops after 10,000 steps and says so rather than looping forever: no trace has ever needed that many, and none is known to need them.

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Realistic sample

Type or paste any realistic input — the tool computes the result locally and instantly.

Common mistakes

Expecting a server round-trip

Nothing is uploaded — every tool in this category runs entirely in your browser.

Online