Collatz Conjecture Calculator
Find the Collatz steps for a number.
Result
How it is calculated
The Collatz rule is applied repeatedly to a starting integer n: if n is even, replace it with n / 2; if odd, replace it with 3n + 1. The tool counts how many applications it takes to reach 1 (steps) and records the largest value seen along the way (peak, which includes the starting number). Decimals are cut to a whole number, and the start must be at least 1. The loop stops after 100,000 steps as a safety limit. Whether every start reaches 1 is the unproven Collatz conjecture; every number tested so far does.
Worked example
Start at 27. The path begins 27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214 and keeps climbing in bursts. After 111 steps it finally reaches 1, and the highest value it touched along the way is 9,232. So a small start of 27 climbs more than 340 times higher before falling back.
Common mistakes
- Starting with 0 or a negative number; the rule is only defined here for positive integers.
- Counting the starting number as a step; steps count transformations, so reaching 1 from 2 is 1 step.
- Confusing the peak with the final value; the end is always 1, while the peak is the maximum along the path.
- Entering a decimal such as 27.9 and expecting it to be rounded up; it is truncated to 27.
About this calculator
This calculator runs the Collatz conjecture sequence (also called the 3n+1 problem) on any starting number: if it's even, divide by 2; if it's odd, multiply by 3 and add 1. Repeat until you hit 1, and the calculator reports the number of steps and the highest value reached along the way.
It's a famous unsolved problem in mathematics — every number tested so far eventually reaches 1, but no one has proven it's true for all numbers. Math enthusiasts, students, and programmers use this calculator to explore the sequence and see how wildly the peak value can spike before collapsing back down.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Starting at 27 is a nice demonstration: it needs 111 steps to reach 1 and climbs as high as 9,232 along the way, even though the start is small. The tool shows both the step count and the peak value so you can see how erratic the path is. Whole numbers of 1 or more only, and decimals are cut off. Try 97 and compare it with 27. Which starting number gave you the longest run?