MATHS & STATISTICS / NUMBER THEORY

Prime factorisation calculator

Break a whole number into its prime factors, check whether it is prime, and count and add up all of its divisors.

Last reviewed:

← All tools

Your numbers

◈ Your values stay in your browser. No account needed.
YOUR RESULT

Enter your numbers to see a result.

WORKED EXAMPLE

Prime factorisation calculator: a worked example

With whole number 360, the prime factorisation is 2³ × 3² × 5.

Inputs
Whole number360
Results
Prime factorisation2³ × 3² × 5
Prime number?No
Distinct prime factors3
Prime factors counted with repeats6
Number of divisors24
Sum of all divisors1,170
THE METHOD

How it works

Every whole number above 1 can be written as a product of prime numbers in exactly one way, apart from order. The calculator finds the primes by trial division up to the square root of the number, which is quick for any number up to one million million. From the exponents it works out how many divisors the number has and their total.

Formulan = p₁^e₁ × p₂^e₂ × … Number of divisors = (e₁ + 1)(e₂ + 1)… Sum of divisors = Π (p^(e+1) − 1) ÷ (p − 1).
ASSUMPTIONS

Assumptions and limits

  • The number is a whole number from 2 to one million million.
  • Divisor counts include 1 and the number itself.
  • Factorisation is exact; no probabilistic primality test is used.
  • Results are estimates based on the inputs and assumptions on this page, not professional advice.
  • Try this: use “Save scenario A”, change one input and compare the two results side by side.
QUESTIONS

Frequently asked questions

How is the result of the “Prime factorisation calculator” calculated?

n = p₁^e₁ × p₂^e₂ × … Number of divisors = (e₁ + 1)(e₂ + 1)… Sum of divisors = Π (p^(e+1) − 1) ÷ (p − 1). Every whole number above 1 can be written as a product of prime numbers in exactly one way, apart from order. The calculator finds the primes by trial division up to the square root of the number, which is quick for any number up to one million million. From the exponents it works out how many divisors the number has and their total.

What does the worked example show?

With whole number 360, the prime factorisation is 2³ × 3² × 5. Prime number?: No; Distinct prime factors: 3; Prime factors counted with repeats: 6; Number of divisors: 24; Sum of all divisors: 1,170.

What assumptions and limits apply?

This is an estimate based on the inputs and assumptions shown on this page, not professional advice. Check anything with financial, health or safety consequences independently.

Is my data private?

Yes. Calculations run in your browser and your numbers are not sent to a server. A share link contains the inputs you choose to share, so check it before sending it to anyone.

What is the prime factorisation of 360?

360 = 2³ × 3² × 5. It has (3 + 1)(2 + 1)(1 + 1) = 24 divisors, and they add up to 1,170.

Is 1 a prime number?

No. A prime has exactly two divisors, 1 and itself, and 1 has only one. Excluding 1 keeps every number's prime factorisation unique.

How do I factorise a number by hand?

Divide by 2 as many times as possible, then by 3, 5, 7 and so on. Stop when the divisor squared exceeds what remains; any remainder above 1 is itself prime.

FOR WEBSITE OWNERS

Embed this calculator on your site

Free to use. Paste this where you want the calculator to appear. It resizes itself and links back to Calculator786.