Skip to main content
Calcimator

Prime Factorization Calculator

Find the prime factorization of any number. Shows all prime factors, divisors, and whether the number is prime, perfect, abundant, or deficient.

About this calculator

This calculator takes a single positive integer, Number to Factor, and derives everything else from it: prime factorization by trial division (lines 28-36, testing divisors starting at 2), the full list of divisors by checking every integer up to its square root (lines 48-62), and a classification as prime, perfect, abundant, or deficient by comparing the sum of proper divisors to the number itself (lines 194-208). At the default (360 = 2³ × 3² × 5), Total Prime Factors counts 6 (three 2s, two 3s, one 5, with multiplicity) while Unique Prime Factors counts 3 (just 2, 3, and 5). Because there is only one input, every output here is entirely determined by Number to Factor — but that does not mean these outputs move predictably as the number changes.

Prime factorization and divisor counts are number-theoretic functions with no smooth trend: 360 has 24 divisors, but 359 (one less, and prime) has only 2, and 361 (one more, and 19²) has exactly 3. A calculator that only ever nudges the input by a fixed percentage cannot characterize that kind of function honestly as "increasing" or "decreasing," because the true behavior swings wildly and non-monotonically from one integer to the next. This calculator does not handle non-integer or negative input (both are normalized away by Math.abs(Math.floor(...)) at line 22 and 49 before any factoring begins) and does not factor numbers so large that trial division up to their square root becomes impractically slow.

Inputs

Results

Prime Factorization

2^3 × 3^2 × 5

Prime Factors (Expanded)2 × 2 × 2 × 3 × 3 × 5
Is Prime?No
Total Prime Factors6
Unique Prime Factors3
All Divisors1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
Number of Divisors24
Sum of All Divisors1,170
Number ClassificationAbundant number
Factor Tree360 ├── 2 └── 180 └── ├── 2 └── └── 90 └── └── ├── 2 └── └── └── 45 └── └── └── ├── 3 └── └── └── └── 15 └── └── └── └── ├── 3 └── └── └── └── └── 5
How to Use This Calculator
  1. Enter any positive integer in the Number to Factor field (up to the supported maximum).
  2. The calculator uses trial division to decompose the number into its prime factors (e.g., 60 = 2² × 3 × 5).
  3. Prime Factorization shows the compact exponential form; Prime Factors (Expanded) lists every prime in the product.
  4. All Divisors lists every integer that divides the number evenly — useful for finding GCF or LCM manually.
  5. The Is Prime? output tells you immediately if no factorization exists beyond 1 and the number itself.
  6. Numbers can be classified as perfect, abundant, or deficient based on the sum of their proper divisors.

Recommended for this calculation

We may earn a commission if you sign up through these links.

Texas Instruments

Graph, solve, and visualize every statistics problem

TI-84 Plus CE Graphing Calculator, Color Screen

See on Amazon
Mr. Pen

Work through problems the way they're meant to be graphed

Mr. Pen Graph Grid Journal Notebook, A5, 160 Pages

See on Amazon
Casio

417 functions for every equation you'll ever face

Casio fx-991ES Plus 2 Scientific Calculator

See on Amazon

Texas Instruments: As an Amazon Associate I earn from qualifying purchases.

Mr. Pen: As an Amazon Associate I earn from qualifying purchases.

Casio: As an Amazon Associate I earn from qualifying purchases.

What each input means

Number to Factor
Enter a positive integer

What each result means

Total Prime Factors
Counting multiplicity

Engine last updated . Checked against 2 independently-derived tests how we verify calculators.

Frequently Asked Questions

Why does 360 have both 6 'Total Prime Factors' and 3 'Unique Prime Factors'?

Because they count different things. 360 = 2 × 2 × 2 × 3 × 3 × 5, so Total Prime Factors (line 229, factors.length) counts every prime in that product with repetition — six of them — while Unique Prime Factors (line 230, the deduplicated set) counts only the distinct primes involved: 2, 3, and 5, so three.

If I increase the Number to Factor slightly, will the number of divisors always go up too?

No, and this isn't a minor exception — divisor count genuinely does not trend with the size of the number. 360 has 24 divisors, but the very next integer, 361 = 19², has only 3, and the integer before, 359, is prime and has just 2. Whether a number has many divisors depends on how many small primes divide it, not on its magnitude, so there's no "raising the input raises the output" relationship to state here.

How does the calculator decide whether 360 is 'abundant'?

It sums every divisor except the number itself (line 195, properDivisorSum) and compares that sum to the number: equal means "perfect," greater means "abundant," and less means "deficient" (lines 199-208). For 360, the proper divisors sum to 810, which is greater than 360, so it's classified as abundant — its proper divisors add up to more than twice the number itself.

Does the calculator handle negative or non-integer input?

It never sees one. Every factoring routine calls Math.abs(Math.floor(...)) on Number to Factor before doing any work (line 22 for the prime factorization, line 49 for the divisor list), so a value like −12.7 is silently normalized to 13 before factorization begins — Math.floor rounds toward negative infinity, so −12.7 floors to −13 before Math.abs strips the sign — rather than being rejected or producing an error.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.