Greatest common divisor and least common multiple
Find the largest integer dividing both numbers and the smallest positive multiple shared by them. These answer different grouping and cycle questions.
Break one positive whole number into prime factors, see repeated factors as powers, and follow every exact division step.
Saved in this browser. Before changing devices, export a backup from My tools.
A power means repeated multiplication: 2^3 is 2 × 2 × 2, not 2 × 3. A prime has exactly two positive divisors, 1 and itself. One is neither prime nor composite.
Use whole numbers from 1 to 1000000000000 without thousands separators. One is neither prime nor composite and has no prime factors. Every factor shown is prime; 2^3 means 2 × 2 × 2. Repeated exact divisions produce factors whose product equals the input. This is not polynomial factorization or a cryptography tool.
Repeatedly divide out each prime factor, checking possible divisors only up to the square root of the remaining number. The factors multiply back to the original integer.
Use whole numbers from 1 to 1000000000000. One is neither prime nor composite and has no prime factors. Powers mean repeated multiplication, not multiplication by the exponent.
This is exact bounded integer factorization, not polynomial factorization, arbitrary-length integer processing or a cryptography tool.
References:OpenStax: primes, composite numbers and prime factorization
Break a single positive whole number into prime factors for a school exercise or an arithmetic check. This is different from finding the greatest common divisor of two numbers; only one input is needed.
Enter a whole number from 1 to 1000000000000 without commas, units, an equals sign or an expression. The example 72 is editable. Zero, negative values and fractions are outside this tool; one receives its own explanation.
Remove every factor of 2, then test successive odd divisors up to the square root of the remaining value. Any remainder greater than one is the last prime factor. Each exact division reduces the remaining integer, and all extracted factors multiply back to the original.
For 840, the successive quotients are 420, 210, 105, 35, 7 and 1 after division by 2, 2, 2, 3, 5 and 7. Thus 840 = 2^3 × 3 × 5 × 7. For 97 the factorization contains just 97, so the input is prime.
The power 2^3 means 2 × 2 × 2, which is 8, rather than 2 × 3. The expanded product shows every repeated factor. The distinct-factor count counts different prime values; it is not the number of all positive divisors of your input.
One is neither prime nor composite and has no prime factorization in this sense. The input bound keeps division and multiplication within exact safe-integer arithmetic. This tool does not handle polynomial expressions, arbitrary-length integers or cryptographic key analysis. Use the separate GCD and LCM tool for two-number comparisons.
You are offline. Calculations use the version already downloaded.