Skip to content
Quaestio

Prime factors

Enter a number and it is broken into primes. Further down are the highest common factor and the lowest common multiple.

Press an example, or type a number of your own.

Broken into primes

360 = 2³ · 3² · 5

  • Is it prime?No
  • Number of divisors24
  • Sum of the divisors1,170

All divisors

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 8
  • 9
  • 10
  • 12
  • 15
  • 18
  • 20
  • 24
  • 30
  • 36
  • 40
  • 45
  • 60
  • 72
  • 90
  • 120
  • 180
  • 360

Two numbers: HCF and LCM

The highest common factor and the lowest common multiple of two numbers.

  • Highest common factor6
  • Lowest common multiple36

The product of two numbers equals their highest common factor times their lowest common multiple.

Embed

Embed this tool on your site

Copy the code and paste it where the tool should appear, such as a blog post or a school page. It is free, the box has no ads and the tool calculates in the visitor’s browser.

How it works

Every whole number above one can be written as a product of primes, and in only one way. That is the fundamental theorem of arithmetic, and it is why primes are called the building blocks of the numbers.

The search peels off two and three first, then tries only numbers of the form six times something, plus or minus one. Every prime except two and three has that form, which removes two thirds of the candidates.

Searching up to the square root is enough. If no divisor is found there, what remains is itself prime, because a divisor above the root always has a matching divisor below it.

The number of divisors follows straight from the exponents: add one to each and multiply them together. 360 is 2³ · 3² · 5, so four times three times two, which gives twenty-four divisors.

The highest common factor is found with Euclid’s algorithm, which is over two thousand years old and still the quickest route. The lowest common multiple follows from it, since the product of two numbers equals their highest common factor times their lowest common multiple.

Two numbers with no common factor beyond one are called coprime. That is what makes a fraction impossible to reduce any further.

How the tools are checked