Math calculator

Collatz Conjecture Calculator

Halve it if even, triple and add one if odd. Does it always reach 1?

Halve it or triple it, until 1

Nobody has proved that it always ends.

starting at 27

111 steps

It reached 1 after 111 steps, having climbed as high as 9232 on the way.

Steps to reach 1

111

the total stopping time

Highest value

9232

at step 77

Triplings

41

3n + 1, on odd numbers

Halvings

70

n ÷ 2, on even ones

The climb, on a logarithmic scale

The scale is logarithmic because a linear one would flatten everything before the peak into a single line. The shape is the interesting part: the sequence climbs, often a long way, and then falls — and no one can prove it always does.

The first 30 values

27824112462319447142712141073221614842421213641829127413741220610331015546623370082 more
  • Reached 1 in 111 steps, 41 of them tripling and 70 halving.
  • The peak was 9232, 341.9 times the starting value — the sequence is allowed to climb a long way before it comes down.
  • Whether every starting value reaches 1 is unproven. It has been checked past 2⁶⁸ by computer, and Terence Tao proved in 2019 that almost all starting values eventually go below any given bound — which is close, and still not a proof.

Every value is an arbitrary-precision integer, so a trajectory that climbs past 2⁵³ stays exact.

What this tool shows

Start at 27 and this rule takes 111 steps, climbing as high as 9,232 before it finally comes down. Whether every starting number reaches 1 is unproven, and has been for ninety years — it is one of the simplest unsolved problems in mathematics.

  • The full Collatz trajectory from any start
  • How many steps it takes to reach 1
  • The highest value it climbs to
  • How many triplings and how many halvings
  • The shape of the climb, on a log scale
  • What is actually known about the conjecture
The climb drawn Exact big integers Unproven, and said so Peak and stopping time

Exact at any size; the conjecture remains open.

Updated 7 September 2026 · Works in any browser, no installation

If it is even, halve it. If it is odd, triple it and add one. Repeat. Every starting number anyone has ever tried eventually reaches 1, and nobody has been able to prove that all of them do. Starting at 6: 3, 10, 5, 16, 8, 4, 2, 1 — eight steps. Starting at 27 takes 111.

At a glance

Formula shown
f(n) = n/2 when n is even, 3n + 1 when n is odd. The conjecture is that repeating f from any positive integer eventually reaches 1. Every odd step is immediately followed by an even one, since 3n + 1 is even whenever n is odd.
Scenario support
Exploring the problem for a class or an article; checking a programming exercise against exact trajectories; finding the peak a particular start reaches.
Educational estimate
Planning support from the values you enter — not professional advice.

The rule, and what it does

Two instructions, no exceptions. Even numbers get halved. Odd numbers get tripled, plus one.

Notice that 3n + 1 is always even when n is odd, so every tripling is immediately followed by a halving. The pair together turns n into roughly 1.5n, which is why the sequence climbs when it meets a run of odd numbers.

Powers of two are the easy case: 1024 just halves ten times and lands. Everything else wanders, and how far it wanders is not predictable from the starting number in any way anyone has found.

Once at 1 the sequence cycles 1 → 4 → 2 → 1 forever, which is why reaching 1 counts as finishing.

Why 27 is the famous one

26 takes 10 steps. 28 takes 18. 27 takes 111, and climbs to 9,232 on the way — 342 times where it started.

There is nothing visibly special about 27. Its neighbours behave ordinarily, and no property of the number predicts the excursion. That is the point: the stopping time is not a smooth function of the start, and small changes to the input produce completely unrelated behaviour.

This is why the problem resists the usual tools. There is no monotone quantity that decreases at every step, and no obvious structure to induct on. The sequence simply does what it does.

Below 100,000 the record holder is 77,031, which takes 350 steps and peaks above 21 billion.

Why it is hard

Erdős said of it: “Mathematics is not yet ready for such problems.” The statement is short enough for a child; the proof has resisted everyone for ninety years.

The difficulty is that the rule mixes two incompatible operations. Halving is about the binary representation; tripling and adding one is about arithmetic. Neither structure survives the other, so techniques that understand one are blind after a single step of the other.

To prove the conjecture you would have to rule out two things: that some trajectory runs off to infinity, and that some trajectory falls into a cycle other than 1 → 4 → 2. Neither has been ruled out, though both are known to be very constrained.

Related-looking problems are known to be undecidable. Conway showed that a natural generalisation of the Collatz rule — allowing several branches instead of two — has no algorithm that decides it, which suggests the difficulty here is structural rather than a matter of not having tried hard enough.

What is actually known

Checked by computer past 2⁶⁸ — every starting value up to about 2.95 × 10²⁰ reaches 1. That is an enormous amount of evidence and no proof at all.

Tao, 2019. Almost all starting values eventually fall below any given function that tends to infinity, however slowly. This is the strongest partial result there is: it says almost every orbit gets very small, and stops just short of saying it reaches 1.

Cycles are constrained. Any cycle other than 1 → 4 → 2 would have to be extraordinarily long — bounds run into the hundreds of millions of terms — and none has been found.

The counterexample would be strange. If one exists it must exceed 2⁶⁸ and either diverge to infinity or cycle. Nobody has ruled either out.

The heuristic that suggests it is true

There is a probabilistic argument that the sequence should tend downwards, and it is worth knowing because it explains why almost everyone expects the conjecture to be true.

Take an odd number. Triple and add one, then halve — that is guaranteed, since 3n + 1 is even. The result is about 1.5n. But it is even again half the time, and halving again gives 0.75n.

Averaged geometrically over the parities, each step multiplies by about 0.75. A quantity that shrinks by a quarter on average should eventually reach 1.

This is a heuristic, not a proof, and it is worth being clear why: the steps are not independent random events. They are determined by the number, and determinism is exactly where the argument has no purchase. A single starting value that resists would break the conjecture regardless of the average.

Why a computed answer proves nothing

Every trajectory this page produces reaches 1. That is worth stating plainly for what it is: a fact about the numbers you happened to try.

A conjecture about all positive integers cannot be established by checking any finite number of them. Checking past 2⁶⁸ did not prove it, and neither will anything typed here.

Mathematics has form on this. Several conjectures held for enormous ranges before failing — Pólya’s conjecture survived to about 900 million; the Mertens conjecture was disproved only by a non-constructive argument, with no counterexample ever exhibited. Large amounts of evidence are evidence, and they are not proof.

The page reports what it computed and stops there. If a trajectory runs past this page’s step limit, that is a limit of the page, and it is labelled as one.

Sources and methodology

The conjecture is open, so the references are to what has actually been established.

Method. The walk runs on arbitrary-precision integers, so a trajectory that climbs past 2⁵³ stays exact rather than drifting. The climb is drawn on a logarithmic scale because a linear one flattens everything before the peak into a single line. The suite runs every starting value below five thousand all the way to 1, which is a real check that the implementation terminates — and is not, and is not presented as, evidence for the conjecture. That engine is verified on every change against 76 hand-written assertions, including that every starting value below five thousand reaches 1 under this implementation, which tests the code and not the conjecture. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

FibonacciEvery digit of F(n), not a rounded double — a JavaScript number stops being exact at F(79), and F(80) is where most web calculators quietly go wrong.
Nth TermGive it the terms and it finds the rule — arithmetic, geometric, quadratic or Fibonacci-like — with the difference table, and an honest 'no rule found' when there is none.
Prime NumberWhether a number is prime, with a divisor named when it is not and the size of the search stated when it is. Deterministic, not probabilistic.
Divisibility TestEvery divisibility rule from 2 to 16 applied to your number, each with its working, the reason it holds, and the true remainder beside it as a check.
ModuloAll three conventions at once, because −7 mod 3 is −1 in JavaScript and 2 in Python and a page that gives only one of those is wrong for half its readers.
FactorEvery factor of a number listed in the pairs that generate them, with the count derived from the prime exponents and separately checked against the list.

More in Math, or browse all calculators.

Read the guide

The rule turns on whether a number is even, which is the simplest case of the divisibility test — the Divisibility Test Calculator covers the general one, and the Modulo Calculator the parity check itself.

Educational use disclaimer

This is an educational tool. Every trajectory shown here reaches 1, and that is not evidence the conjecture is true — it is unproven, and no amount of checked cases proves a statement about all of them.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the Collatz page drawing the trajectory rather than summarising it, since the climb is what makes the problem interesting and a stopping time alone hides it.
  2. The page states plainly that the conjecture is unproven and that a computed trajectory settles nothing — including that the suite's own five thousand terminating walks test the code and not the conjecture.
  3. Tao's 2019 result is cited as the strongest partial progress rather than the problem being left as folklore.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.