The least common multiple and greatest common divisor of two numbers — computed with Euclid's algorithm, steps included.
GCD — greatest common divisor
6
largest number dividing both 12 and 18
LCM — least common multiple
36
smallest number both divide into evenly
The last non-zero remainder is the GCD: 6. Then LCM = (12 × 18) ÷ 6 = 36.
Repeatedly replace the larger number with the remainder of dividing by the smaller. Over two thousand years old and still the fastest way to find a GCD.
A GCD of 1 means the numbers are coprime — they share no factors. Coprime pairs are the foundation of RSA encryption and many scheduling tricks.
This identity always holds for positive integers — a built-in sanity check on any LCM/GCD answer, and the exact formula this tool uses.
Positive whole numbers up to a trillion — decimals are rounded down, negatives take their absolute value.
GCD and LCM appear side by side, with a note when the numbers are coprime.
Each division-with-remainder step is listed, ending at the last non-zero remainder — the GCD.
Use the GCD to reduce fractions and the LCM as a common denominator or cycle-sync point.
Whole numbers only — for fraction or decimal inputs, scale them to integers first.
Calculators & Math
Estimate your 2026 Australian take-home pay after income tax and the 2% Medicare levy. Annual, monthly and fortnightly views. Your input is processed in your browser and is not stored by us.
Calculators & Math
Generate 10 to 100 cryptographically secure passwords in one click. Custom length, character sets, copy each one, or download the batch as a .txt file.
Calculators & Math
Estimate your 2026 Canadian take-home pay after federal and provincial income tax. Ontario, BC, Alberta and Quebec. Your input is processed in your browser and is not stored by us.
Calculators & Math
Project future value of a lump sum plus monthly contributions with selectable compounding frequency, year-by-year growth table and invested-vs-gains visualisation.
Calculators & Math
Find your daily protein target in grams from body weight and goal — with a per-meal split and food-portion examples.
Need a custom tool?
We build calculators and internal tools for businesses — get in touch.
Directory last updated 2 December 2026.
Disclaimer: inputs are treated as whole numbers — decimals are truncated and results are exact only within JavaScript's safe-integer range (up to 9 × 10¹⁵).