Primes, GCD and LCM
Check if a number is prime, list the primes up to N, find the GCD and LCM of a list, and break a number into prime factors.
Task
Result
What it does
This tool has four jobs. It checks whether a number is prime and names its smallest factor if not. It lists all primes up to N, with N up to 100,000. It finds the greatest common divisor (GCD) and the least common multiple (LCM) of a list of numbers. And it breaks a number into its prime factors, written like 2^3 x 3^2 x 5, with the number of divisors. It runs in your browser. Use it as a prime number checker, a GCD calculator or an LCM calculator.
How to use it
- 1Choose a task.
- 2Enter the number, or a list for GCD and LCM.
- 3Read the result and copy it.
Common uses
- Check whether a number is prime, such as 97 or 1,000,003.
- Get a list of all primes up to 100.
- Find the GCD of 12 and 18 to simplify a fraction.
- Find the LCM of 4, 6 and 10 for a common denominator or a schedule.
- Break 360 into prime factors for a maths lesson.
Questions
How large a number can I check?
Any whole number up to 9,007,199,254,740,991.
Why is 1 not prime?
A prime has exactly two divisors, 1 and itself. The number 1 has only one, so it is not prime.
How many primes can I list?
All primes up to 100,000, which is 9,592 numbers.
How do I enter several numbers for GCD and LCM?
Type them with spaces or commas, for example 12 18 or 4, 6, 10. Use whole numbers greater than zero.
What is the difference between GCD and LCM?
The GCD is the biggest number that divides all of them. The LCM is the smallest number that all of them divide.
How is the prime factorisation written?
As powers joined by x, for example 360 = 2^3 x 3^2 x 5.
Is my number sent anywhere?
No. Everything is calculated on your device.