Skip to main content
math

Collatz Conjecture Calculator

Trace the Collatz sequence (3n+1 problem) from any positive integer. Count the number of steps to reach 1 and find the maximum value reached.

By Christopher FloiedPublished Updated

Minimum: 1. Whole numbers only

Starting value for the Collatz sequence (must be ≥ 1)

Results

Steps to Reach 1

111

Maximum Value

9232

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Collatz Conjecture Calculator. Follow the units and input format printed next to each field. Where a unit selector is available, choose the units that match your data.

2

Review your inputs

Double-check that all values are correct and match the units or format shown for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Collatz Conjecture Calculator computes the output in your browser and displays the results, with units clearly labeled, as soon as they are ready — no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

When to Use This Calculator

  • •Use the Collatz Conjecture Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • •Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • •Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • •Use it to explore the behavior of mathematical functions across a range of inputs.

Related Calculators

About Collatz Conjecture Calculator

The Collatz conjecture, also known as the 3n + 1 problem, is one of the most famous unsolved problems in mathematics. Start with any positive integer n. If n is even, divide by 2; if n is odd, multiply by 3 and add 1. Repeat. The conjecture states that no matter what starting number you choose, the sequence will always eventually reach 1. Despite its simple statement, no one has been able to prove or disprove this conjecture since Lothar Collatz first proposed it in 1937. The conjecture has been verified computationally for all starting values up to approximately 2.95 × 10²⁰, but a general proof remains elusive. Paul Erdos famously said that mathematics is not yet ready for such problems. The sequences can exhibit wildly unpredictable behavior — the starting value 27 takes 111 steps and reaches a maximum of 9232 before finally descending to 1. This calculator traces the full Collatz sequence and reports the number of steps and the peak value.

The Math Behind It

The Collatz function is T(n) = n/2 if n is even, (3n+1)/2 if n is odd (shortcut form). The total stopping time is the number of iterations until the sequence first reaches 1. The conjecture is equivalent to saying every positive integer has finite stopping time. Related sequences include the reduced Collatz map and the Syracuse function. Terras (1976) showed that almost all numbers (in the sense of natural density) have finite stopping time. Tao (2019) proved that the Collatz conjecture is true for almost all numbers in a logarithmic density sense. The sequence is related to p-adic numbers and has connections to dynamical systems, automata theory, and number theory. The problem remains one of the simplest-to-state yet hardest-to-prove problems in mathematics.

Formula Reference

Collatz Rule

If n is even: n → n/2; If n is odd: n → 3n + 1

Variables: n = current value in the sequence

Worked Examples

Example 1: Collatz Sequence from 6

Trace the sequence starting at 6.

Step 1:6 → 3 (even: 6/2)
Step 2:3 → 10 (odd: 3×3+1)
Step 3:10 → 5 → 16 → 8 → 4 → 2 → 1

Reached 1 in 8 steps; maximum value = 16.

Common Mistakes & Tips

  • !Starting with 0 or a negative number — the conjecture applies only to positive integers.
  • !Stopping when the sequence first decreases instead of continuing until it reaches 1.
  • !Assuming shorter starting numbers always take fewer steps — 27 takes 111 steps!

Related Concepts

Frequently Asked Questions

Has the Collatz conjecture been proven?

No, as of 2025 the Collatz conjecture remains unproven. It has been verified computationally for extremely large numbers but no general proof exists.

Why is 27 a famous starting value?

Starting at 27, the sequence takes 111 steps and climbs to a maximum of 9232 before returning to 1 — a surprisingly long and high trajectory for such a small starting number.

Add the live Collatz Conjecture Calculator to your site. Free to embed, with a link back to MegaCalc.