1. Home
  2. Calculators
  3. Prime Factorization Calculator

Prime Factorization Calculator

For students and puzzle fans who want the full factorisation of a number and what follows from it.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Prime Factorization Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table.

Features

  • Prime factorisation in power form
  • Divisor count and divisor sum
  • Euler totient and prime test
  • Next and previous prime
  • Numbers up to 10^15

Supported formats

Input

  • A typed number

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Prime Factorization Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It factors whole numbers up to 10^15 by trial division; larger numbers need specialised software.
  • Numbers made of two large primes near the limit take the longest.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Prime factorisation: factors, divisors, the totient and neighbouring primes of a whole number

Every whole number above 1 is either a prime or a product of primes in exactly one way, apart from the order. Finding that product is called prime factorisation, and it is the key to simplifying fractions, finding common divisors and understanding how numbers are built. This page factors a number and reports what the factorisation reveals.

How it works

The tool divides by 2, then by 3, and then only by numbers of the form 6k minus 1 and 6k plus 1, because every prime above 3 has that form. After each successful division it continues with the quotient, and it stops when the divisor squared exceeds what is left, at which point the remainder, if larger than 1, is itself a prime. This is quick for numbers up to 10 to the power 15, the limit of the page, because the loop needs to check divisors only up to the square root, about 31.6 million at the top of the range.

What you get

The result shows whether the number is prime, its factorisation in power form, the distinct primes, the number of divisors, the sum of the divisors and Euler’s totient. The number of divisors is the product of each exponent plus one. The divisor sum multiplies, for each prime power, the sum of its powers from 1 up. The totient counts how many numbers from 1 to n share no factor with n, and it is computed from the primes as n times the product of one minus one over each prime. A line classifies the number as prime, perfect, abundant or deficient, notes if it is a perfect square, and gives the next and previous primes.

Edge cases

The input must be a whole number from 2 to 10 to the power 15. Primes factor into themselves, and the page says so. Numbers made of two large primes of similar size are the slowest case, since the loop has to run nearly to the square root. Larger numbers need specialised algorithms and are rejected with a message rather than left to hang the page. The factorisation of 1 is empty and is not offered.

A worked example

For 360 the factorisation is 2^3 × 3^2 × 5. The divisor count is 4 × 3 × 2 = 24, the divisor sum is 15 × 13 × 6 = 1,170, and the totient is 96. The proper divisors add up to 810, so 360 is abundant, and its neighbouring primes are 359 and 367. For the prime 97 there are 2 divisors, a divisor sum of 98 and a totient of 96, and the neighbours are 89 and 101. The number 496 factors as 2^4 × 31 and is perfect. The well-known 600851475143 factors as 71 × 839 × 1471 × 6857.

Limits

Trial division is simple and correct but not fast for huge numbers, and this page is for study and puzzles, not for key sizes in encryption, where numbers are hundreds of digits long. It gives the complete factorisation, not a probabilistic primality test, so the answers are exact within the stated range.

Checked against the current version of the Prime Factorization Calculator on .

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two divisors, itself and 1, and 1 has only one. Treating 1 as non-prime is what keeps the factorisation of every other number unique.

What does it mean when the proper divisors of a number add up to the number itself?

The number is called perfect. 6 is the first one, and 496, which the tool uses as a sample, has proper divisors adding up to exactly 496. If they add up to more it is abundant, and to less it is deficient.

What are the prime factors of 360?

360 = 2³ × 3² × 5. It has 24 divisors, which sum to 1,170, and Euler’s totient is 96.

How large a number can it factor?

Any whole number up to 10^15, found by trial division with the 6k ± 1 shortcut. A number made of two large primes is the hard case.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.