Home › Fun & Games › Collatz Conjecture Calculator

Collatz Conjecture Calculator

Pick a starting number: halve it if it is even, triple it and add 1 if it is odd, and repeat. The Collatz conjecture says you always reach 1. See the full sequence, how many steps it takes, how high it climbs and its hailstone graph, or find the longest sequences in a range.

Last updated:

What to calculate

Any positive whole number, even very large ones (up to 100 digits).

Enter your values to see the result.
Advertisement
Advertisement

How to use the Collatz Conjecture Calculator

  1. Enter a starting number, for example 27.
  2. Press Calculate to generate the sequence down to 1.
  3. Read the step count and highest value.
  4. Look at the hailstone chart; switch on the log scale for big numbers.
  5. Try range mode to find which start below a limit takes the most steps.

The 3n + 1 rule

f(n) = n ÷ 2 if n is even,   f(n) = 3n + 1 if n is odd

Repeat f until the value is 1. After 1 the sequence would loop 1 → 4 → 2 → 1 forever, so the calculation stops there. Example from 6: 6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1 (8 steps).

Notable starting numbers

StartSteps to 1Highest valueNote
71652
91952
271119,232Famous long sequence for a small start
971189,232Longest below 100
871178190,996Longest below 1,000
6,171261975,400Longest below 10,000
77,03135021,933,016Longest below 100,000
837,7995242,974,984,576Longest below 1,000,000

Frequently asked questions

What is the Collatz conjecture?

Start with any positive integer. If it is even, divide it by 2; if it is odd, multiply by 3 and add 1. The conjecture, posed by Lothar Collatz in 1937, says that this process always eventually reaches 1. It is also called the 3n + 1 problem, the Ulam conjecture or the hailstone problem.

Has the Collatz conjecture been proven?

No. It is one of the most famous unsolved problems in mathematics. It has been checked by computer for every starting number up to about 2⁶⁸ (roughly 3 × 10²⁰), and in 2019 Terence Tao proved that almost all starting values reach almost bounded values, but there is still no complete proof.

Why does 27 take so many steps?

Starting from 27, the sequence takes 111 steps to reach 1 and climbs as high as 9,232 along the way, even though it starts below 30. Small changes in the start can give very different sequences, which is part of what makes the problem hard.

What is a hailstone sequence?

It is another name for a Collatz sequence. The values rise and fall repeatedly, like a hailstone moving up and down in a cloud, before finally falling to 1.

What is the stopping time?

The total stopping time is the number of steps to reach 1. The (first) stopping time is the number of steps until the value first falls below the starting number. Proving that every number has a finite stopping time would prove the conjecture.

Which number below one million has the longest sequence?

837,799, which needs 524 steps to reach 1. Use range mode with 1,000,000 to see it and the other top starts.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Random Number GeneratorPick random numbers in any range, unique or lottery-style.Birthday Paradox CalculatorChance that two people in a group share a birthday, with a chart from 1 to 100 people.Dice Probability CalculatorOdds of rolling a sum (exactly, at least, at most) with any dice, plus the full distribution.Coin FlipFlip a coin online: heads or tails, multiple coins and stats.Fortune Cookie GeneratorCrack a virtual fortune cookie for an original fortune, lucky numbers and a daily pick.Never Have I Ever QuestionsClean and party never have I ever questions with a built-in point counter for players.Username GeneratorGenerate cool usernames and gamertags by style, fitted to each platform's rules.Magic 8 BallAsk a yes-or-no question, shake the ball and get one of the 20 classic answers.Fantasy Creature GeneratorInvent original fantasy creatures with a name, body, powers, habits, weakness and danger level.Age on Other PlanetsSee how old you are on Mars, Jupiter and every other planet, plus your next birthdays.Rock Paper ScissorsPlay rock paper scissors vs the computer in best-of matches, with stats and a lizard-Spock mode.Dots and BoxesPlay Dots and Boxes online vs a smart computer or a friend, on boards from 3×3 to 8×8.Life in WeeksSee your life as a grid of weeks: weeks lived, weeks left, milestones and a printable poster.Baby Eye Color CalculatorOdds of brown, green or blue eyes for your baby from parents' and grandparents' eye colors.Chinese Gender PredictorBoy or girl by the traditional Chinese chart: lunar age and lunar month worked out for you.Countries Visited MapClick the countries you have been to on a world map, see your % of the world and save a PNG.Height Comparison ChartCompare heights side by side with to-scale silhouettes in ft/in or cm, then export a PNG.Speedcube TimerSpeedcubing timer with 2x2–7x7 scrambles, WCA inspection, ao5/ao12 stats and saved history.Air HockeyPlay air hockey online vs the computer or a friend on one screen. Real puck physics, first to 7.Anniversary Gift by YearTraditional and modern anniversary gifts, gemstone, flower and color for any year, with ideas.Baby Name Meaning FinderLook up what 500+ baby names mean, their origin, gender and variants, or search by meaning.Biorhythm CalculatorPhysical, emotional and intellectual biorhythm cycles for any date, with a 30-day chart.Brain TeasersLogic, lateral-thinking and math brain teasers with hints and full solutions, including a kids level.Crazy EightsPlay Crazy Eights vs 1-3 computer players: match suit or rank, 8s are wild, score to 100.CribbagePlay Cribbage vs the computer with automatic pegging, hand and crib scoring on an animated board.Darts ScoreboardScore 301, 501, 701 and Cricket for 1-4 players with checkout hints, averages and undo.Dog Breed SelectorAnswer 8 quick questions about your home and lifestyle to get ranked dog breed matches.Golf ScorecardDigital 9 or 18 hole golf scorecard for up to 6 players: putts, fairways, GIR, net and Stableford.HIIT Workout GeneratorPick time, equipment and intensity to get HIIT rounds with a built-in work/rest timer and audio cues.Letter from Santa GeneratorMake a personalized, printable letter from Santa with your child's name, good deeds and wish.Find the Odd Emoji OutSpot the one different emoji in a growing grid before the clock runs out.Online ScreensaverFull-screen screensavers in your browser: starfield, pipes, aquarium, matrix rain, bouncing logo and clock.Optical IllusionsInteractive optical illusions with a reveal switch that shows the trick and explains it.Party SoundboardPlay applause, drumroll, air horn, crickets, rimshot, ta-da and more with one tap or key.Pickleball Score KeeperKeep pickleball score with server number, side-outs, called score (4-2-1) and win by 2.Round Robin GeneratorMake a round robin schedule for any league: rounds, home/away, byes, double round, print or CSV.Scavenger Hunt GeneratorMake printable scavenger hunt lists for indoors, outdoors, kids, road trips and photo hunts.This or That QuestionsRapid either/or questions for kids, couples, work, food and more, with a group tally mode.Virtual FireplaceFull-screen animated fireplace with crackling fire sounds, flame colors, intensity and a sleep timer.
See all 37 Party & Fun Tools →