---
title: "Prime Factorization Calculator | Method Calculator"
description: "Break any number into its prime factors, check whether it is prime, and list all of its divisors with the step-by-step factor tree."
canonical_url: "https://methodcalculator.com/prime-factorization-calculator"
meta:
  "og:description": "Break any number into its prime factors, check whether it is prime, and list all of its divisors with the step-by-step factor tree."
  "og:image": "https://methodcalculator.com/_og/s/o_eabaa938a727f6af.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Prime Factorization Calculator – Free Online Tool"
  "twitter:image": "https://methodcalculator.com/_og/s/o_eabaa938a727f6af.png"
---

> Index of every page on this site: [llms.txt](https://methodcalculator.com/llms.txt)

# **Prime Factorization Calculator**

Enter any whole number up to one trillion to get its prime factorization, whether it is prime, the number and sum of its divisors, the nearest primes and the full list of divisors.

## **Result**

Prime factorization of 360

**2³ × 3² × 5**

<dl>

<dt>Written out</dt>
<dd>2 × 2 × 2 × 3 × 3 × 5</dd>

<dt>Is 360 prime?</dt>
<dd>**No, it is composite**</dd>

<dt>Number of divisors</dt>
<dd>24</dd>

<dt>Sum of divisors</dt>
<dd>1,170</dd>

<dt>Sum of proper divisors</dt>
<dd>810 (abundant number)</dd>

<dt>Previous prime</dt>
<dd>359</dd>

<dt>Next prime</dt>
<dd>367</dd>

</dl>

### **Repeated division by primes **

1. 360 ÷ 2 = 180
2. 180 ÷ 2 = 90
3. 90 ÷ 2 = 45
4. 45 ÷ 3 = 15
5. 15 ÷ 3 = 5
6. 5 ÷ 5 = 1

### **All 24 divisors of 360**

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

## What is prime factorization?

A prime number is a whole number greater than 1 that can only be divided exactly by 1 and itself: 2, 3, 5, 7, 11, 13 and so on. Every other whole number greater than 1 is composite, and a composite number can always be broken down into a product of primes. That product is its **prime factorization**. The number 360, for example, is 2 × 2 × 2 × 3 × 3 × 5, written compactly with exponents as **2³ × 3² × 5**. The factorization is the DNA of a number: once you have it, you can read off every divisor, test divisibility, simplify fractions and square roots, and compute greatest common factors without any further trial and error.

## The factor tree method

Split the number into any two factors, then keep splitting each composite factor until only primes remain. The primes at the ends of the branches are the prime factorization. Starting from 360:

1. 360 = 36 × 10
2. 36 = 6 × 6 and 10 = 2 × 5
3. 6 = 2 × 3, so each 6 becomes 2 × 3
4. Collect the leaves: 2, 3, 2, 3, 2, 5 → sorted 2 × 2 × 2 × 3 × 3 × 5 = **2³ × 3² × 5**

It does not matter which split you choose first; 360 = 4 × 90 or 360 = 12 × 30 produce the same leaves. An equivalent method, and the one the calculator uses, is repeated division: divide by 2 as many times as possible, then by 3, then 5, and continue with each larger prime until you reach 1. For 360 that is 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, 5 ÷ 5 = 1. Check the answer by multiplying back: 8 × 9 × 5 = 360.

The exponents also give the divisor count and divisor sum directly. Number of divisors = (3 + 1)(2 + 1)(1 + 1) = 24. Sum of divisors = (1 + 2 + 4 + 8)(1 + 3 + 9)(1 + 5) = 15 × 13 × 6 = 1,170.

## The fundamental theorem of arithmetic

Every whole number greater than 1 is either prime or a product of primes, and that product is unique apart from the order of the factors. This is the fundamental theorem of arithmetic, proved in Euclid's *Elements* around 300 BC. Uniqueness is what makes the factorization useful: two people factoring 360 by different routes must arrive at 2³ × 3² × 5. It is also the reason 1 is not counted as a prime, since allowing factors of 1 would make the representation non-unique.

## Divisibility rules

These shortcuts let you spot small prime factors without dividing:

| Divisible by | Rule | Example |
| --- | --- | --- |
| 2 | Last digit is even (0, 2, 4, 6, 8) | 360 ends in 0 |
| 3 | Digit sum is divisible by 3 | 3 + 6 + 0 = 9 |
| 4 | Last two digits are divisible by 4 | 60 ÷ 4 = 15 |
| 5 | Last digit is 0 or 5 | 360 ends in 0 |
| 6 | Divisible by both 2 and 3 | 360 passes both tests |
| 8 | Last three digits are divisible by 8 | 360 ÷ 8 = 45 |
| 9 | Digit sum is divisible by 9 | 3 + 6 + 0 = 9 |
| 10 | Last digit is 0 | 360 ends in 0 |
| 11 | Alternating digit sum (+ − + …) is 0 or divisible by 11 | 3 − 6 + 0 = −3, so not divisible |

## Where prime factorization is used

- **GCF and LCM:** compare prime powers to find the greatest common factor and least common multiple of several numbers, as in the [GCF and LCM calculator](https://methodcalculator.com/gcf-lcm-calculator).
- **Simplifying fractions and roots:** 360/84 reduces by the shared factor 2² × 3 to 30/7, and √360 = √(2² × 3² × 2 × 5) = 6√10.
- **Cryptography:** RSA encryption multiplies two secret primes of around 300 digits each. Anyone can see the product, but recovering the primes by factoring it is infeasible with known methods, which is what keeps the key secure.
- **Counting:** the number of divisors, perfect-square tests and problems about arranging items into equal rows all follow from the exponents.

## How to use this calculator

1. Type a whole number between 2 and 1,000,000,000,000 in the box.
2. Read the prime factorization in the headline. If the number is prime, the headline says so.
3. Check the rows for the divisor count and sum, whether the number is perfect, abundant or deficient, and the primes on either side of it.
4. Scroll down for the division steps and the complete list of divisors.

## Tips and common mistakes

- **1 is not prime** and 2 is the only even prime. A factor tree that ends with a 1 or a 4 is not finished.
- **Stop at the square root:** if no prime up to √n divides n, then n itself is prime. For 97 you only need to test 2, 3, 5 and 7.
- **Multiply back to check.** The product of the prime powers must equal the original number, or a factor was dropped.
- **Exponents are not multipliers:** 2³ means 2 × 2 × 2 = 8, not 2 × 3. The [exponent calculator](https://methodcalculator.com/exponent-calculator) evaluates powers like these.
- **Decimals and negatives** have no prime factorization. Factor the absolute value of a negative number and keep the sign separately.

## **Frequently asked questions **

### **Is 1 a prime number?**

No. A prime is a whole number greater than 1 whose only divisors are 1 and itself. Excluding 1 keeps the fundamental theorem of arithmetic true: if 1 counted as prime, 6 could be written as 2 × 3, 1 × 2 × 3, 1 × 1 × 2 × 3 and so on, and factorizations would no longer be unique.

### **How do I check whether a large number is prime?**

Try dividing it by every prime up to its square root. If none divides it exactly, it is prime. For a 12-digit number the square root is at most 1,000,000, which is why this calculator can answer instantly. Much larger numbers, like the 600-digit ones used in cryptography, need probabilistic tests such as Miller–Rabin instead.

### **What is the difference between factors and prime factors?**

Factors (or divisors) are all the whole numbers that divide a number exactly: 360 has 24 of them, from 1 to 360. Prime factors are the primes among them, 2, 3 and 5, and the prime factorization 2³ × 3² × 5 records how many times each one is used. Every other factor is a product of some of those prime powers.

### **Why is the calculator limited to 1,000,000,000,000?**

It factors by trial division, testing possible divisors up to the square root of the number. At one trillion that is a million candidates, which a browser handles in a fraction of a second. Beyond that the running time grows with the square root, so a 20-digit number could take minutes, and specialised algorithms are needed.

### **How many divisors does a number have?**

Add 1 to each exponent in the prime factorization and multiply. For 360 = 2³ × 3² × 5 that is (3 + 1)(2 + 1)(1 + 1) = 24. A prime always has exactly 2 divisors, and a perfect square always has an odd number of them because its square root is paired with itself.

## **Related calculators **

- [**GCF and LCM Calculator**](https://methodcalculator.com/gcf-lcm-calculator)
- [**Fraction Calculator**](https://methodcalculator.com/fraction-calculator)
- [**Exponent Calculator**](https://methodcalculator.com/exponent-calculator)
- [**Random Number Generator**](https://methodcalculator.com/random-number-generator)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://methodcalculator.com/#website","@type":"WebSite","description":"Free online calculators for finance, health and fitness, math and everyday life. Simple, accurate and fast.","name":"Method Calculator","url":"https://methodcalculator.com/","publisher":{"@id":"https://methodcalculator.com/#identity"}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#webpage","dateModified":"2026-11-02T20:28:45+01:00","datePublished":"2026-11-02T20:28:45+01:00","description":"Break any number into its prime factors, check whether it is prime, and list all of its divisors with the step-by-step factor tree.","name":"Prime Factorization Calculator","url":"https://methodcalculator.com/prime-factorization-calculator","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://methodcalculator.com/prime-factorization-calculator#breadcrumb"},"isPartOf":{"@id":"https://methodcalculator.com/#website"},"mainEntity":[{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/1"},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/2"},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/3"},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/4"},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/5"}],"potentialAction":[{"@type":"ReadAction","target":["https://methodcalculator.com/prime-factorization-calculator"]}],"primaryImageOfPage":{"@id":"https://methodcalculator.com/#logo"}},{"@id":"https://methodcalculator.com/#identity","@type":"Organization","name":"Method Calculator","url":"https://methodcalculator.com","logo":{"@id":"https://methodcalculator.com/#logo"}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://methodcalculator.com","position":1},{"@type":"ListItem","name":"Math Calculators","item":"https://methodcalculator.com/math-calculators","position":2},{"@type":"ListItem","name":"Prime Factorization Calculator","position":3}]},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"UtilitiesApplication","description":"Break any number into its prime factors, check whether it is prime, and list all of its divisors with the step-by-step factor tree.","isAccessibleForFree":true,"name":"Prime Factorization Calculator","operatingSystem":"Any","url":"/prime-factorization-calculator","offers":{"@type":"Offer","availability":"https://schema.org/InStock","price":0,"priceCurrency":"USD","priceValidUntil":"2027-12-30T00:00:00.000Z"}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/1","@type":"Question","inLanguage":"en","name":"Is 1 a prime number?","acceptedAnswer":{"@type":"Answer","text":"No. A prime is a whole number greater than 1 whose only divisors are 1 and itself. Excluding 1 keeps the fundamental theorem of arithmetic true: if 1 counted as prime, 6 could be written as 2 × 3, 1 × 2 × 3, 1 × 1 × 2 × 3 and so on, and factorizations would no longer be unique."}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/2","@type":"Question","inLanguage":"en","name":"How do I check whether a large number is prime?","acceptedAnswer":{"@type":"Answer","text":"Try dividing it by every prime up to its square root. If none divides it exactly, it is prime. For a 12-digit number the square root is at most 1,000,000, which is why this calculator can answer instantly. Much larger numbers, like the 600-digit ones used in cryptography, need probabilistic tests such as Miller–Rabin instead."}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/3","@type":"Question","inLanguage":"en","name":"What is the difference between factors and prime factors?","acceptedAnswer":{"@type":"Answer","text":"Factors (or divisors) are all the whole numbers that divide a number exactly: 360 has 24 of them, from 1 to 360. Prime factors are the primes among them, 2, 3 and 5, and the prime factorization 2³ × 3² × 5 records how many times each one is used. Every other factor is a product of some of those prime powers."}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/4","@type":"Question","inLanguage":"en","name":"Why is the calculator limited to 1,000,000,000,000?","acceptedAnswer":{"@type":"Answer","text":"It factors by trial division, testing possible divisors up to the square root of the number. At one trillion that is a million candidates, which a browser handles in a fraction of a second. Beyond that the running time grows with the square root, so a 20-digit number could take minutes, and specialised algorithms are needed."}},{"@id":"https://methodcalculator.com/prime-factorization-calculator#/schema/question/5","@type":"Question","inLanguage":"en","name":"How many divisors does a number have?","acceptedAnswer":{"@type":"Answer","text":"Add 1 to each exponent in the prime factorization and multiply. For 360 = 2³ × 3² × 5 that is (3 + 1)(2 + 1)(1 + 1) = 24. A prime always has exactly 2 divisors, and a perfect square always has an odd number of them because its square root is paired with itself."}},{"@id":"https://methodcalculator.com/#logo","@type":"ImageObject","caption":"Method Calculator","contentUrl":"https://methodcalculator.com/favicon.svg","inLanguage":"en","url":"https://methodcalculator.com/favicon.svg"}]}
```

## Sitemap

See the full [sitemap](https://methodcalculator.com/sitemap.md) for all pages.
