Prime Factorization Calculator
Type a whole number and get its complete prime factorization, with the division ladder that produces it.
Prime Factorization
Exact trial division — complete and correct for whole numbers from 2 up to 999,999,999,989. Results update as you type.
Every prime factor, in order
2 × 2 × 2 × 3 × 3 × 5
Multiplied back together, these primes give exactly the number you entered — the built-in check on any factorization.
Division ladder
Each row divides the running value by its smallest prime factor until 1 remains.
| Value | ÷ Smallest prime factor | = Quotient |
|---|---|---|
| 360 | ÷ 2 | 180 |
| 180 | ÷ 2 | 90 |
| 90 | ÷ 2 | 45 |
| 45 | ÷ 3 | 15 |
| 15 | ÷ 3 | 5 |
| 5 | ÷ 5 | 1 |
What is the Prime Factorization Calculator?
What this calculator does
Prime factorization writes a whole number as a product of primes, and this page produces the finished factorization plus the division ladder that earns it. One number in, every prime factor out — with each division shown, row by row, the way textbooks teach it.
The ladder is the method, visible
Each ladder row divides the running value by its smallest prime factor and writes down the quotient. The next row starts from that quotient. Rows continue until the quotient is 1, and the divisors you collected along the way are the factorization.
Reading the result tiles
The Prime Factorization tile shows the exponent form, like 2³ × 3² × 5 for 360. The factor panel lists every prime factor in order with repeats, and the counts report how many factors there are in total and how many are distinct.
Worked example: the ladder for 360
Enter 360 and the ladder runs 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, and 5 ÷ 5 = 1. The divisors 2, 2, 2, 3, 3, 5 give 360 = 2³ × 3² × 5.
Worked example: a pure prime power, 625
Enter 625 and every ladder row divides by the same prime: 625 ÷ 5 = 125, 125 ÷ 5 = 25, 25 ÷ 5 = 5, 5 ÷ 5 = 1. Four rows, four 5s, and the factorization is the single power 5⁴.
Worked example: a quotient that hides factors, 2023
Enter 2023. The first row gives 2023 ÷ 7 = 289, and 289 looks finished — but the ladder continues: 289 ÷ 17 = 17, then 17 ÷ 17 = 1. The full factorization is 7 × 17², hidden square and all.
When the ladder has a single row
Enter a prime like 89 and the ladder is one row: 89 ÷ 89 = 1. Nothing smaller divides it, so a prime is its own factorization. A one-row ladder is the visual signature of a prime, just as a long ladder means many small factors.
The trap this page does not fall for: 1849
Short test lists stopping at the prime 37 miss the factor 43 entirely and call 1849 prime. It is really 43 × 43. This page divides by every candidate up to the square root, so the ladder for 1849 is 1849 ÷ 43 = 43, then 43 ÷ 43 = 1.
The supported range, stated honestly
Whole numbers from 2 up to 999,999,999,989 factor exactly, ladder included. Trial division to the square root keeps even the top of the range instant. Beyond it, the page shows an out-of-range message rather than a factorization you cannot trust.
Inputs that have no factorization
Enter 0, 1, a negative number, or a decimal and the page explains instead of inventing a ladder. Zero is divisible by everything, 1 has no prime factors, and factorization is defined for whole numbers above 1 only.
From ladder to exponents
When the ladder ends, count the repeats among its divisors. Three 2s and two 3s in the ladder for 360 compress into exponents: 2³ × 3² × 5. The ladder is the working; the exponent form is the answer you hand in.
The factor tree is the same idea
Paper factorization draws the process as a tree: split the number into its smallest prime factor and the quotient, then split the quotient again until every branch ends in a prime. The ladder on this page is that tree, written as rows instead of branches.
Why the answer is unique
The fundamental theorem of arithmetic guarantees every whole number above 1 factors into primes in exactly one way, apart from order. That uniqueness makes a finished factorization a fingerprint for the number — the reason it is worth computing carefully.
Checking a finished factorization
Multiply the collected primes back together and compare with the original number. For 360, 8 × 9 × 5 = 360, matching exactly. A ladder whose divisors multiply back to the entry is correct; one that misses means a row was dropped.
Where factorizations get used
Lowest terms for fractions, greatest common divisors, least common multiples, simplifying square roots, and factoring quadratics all lean on prime factorizations. So does the security intuition behind RSA encryption, where a large number's factorization is deliberately hard to find.
Counting divisors from the finished ladder
A completed ladder hands you the exponents, and the exponents count the divisors: add one to each and multiply. The ladder for 360 gives 2³ × 3² × 5, so 360 has 4 × 3 × 2 = 24 divisors — a standard contest question answered from the working itself.
Two ladder shapes worth recognizing
A number that is a product of two primes gives a two-row ladder, like 143: 143 ÷ 11 = 13, then 13 ÷ 13 = 1. A prime power gives equal rows throughout, like 625 dividing by 5 four times. The ladder's shape sketches the number's structure.
This page and its twin
The Prime Factor Calculator on this site runs the same complete factorization engine and returns the same factorization. This page adds the division ladder for readers who must show working; the twin leads with the factor counts instead. Results agree either way.
With the pre-filled defaults — Number (n) 84 — the Prime Factorization Calculator returns Smallest Prime Factor 2, Remaining Quotient (n ÷ factor) 42, Is Prime (1 = yes, 0 = no) 0, and 1 more more results. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Prime Factorization Calculator
- 1Type a whole number of 2 or more into the Number (n) box; entries up to 999,999,999,989 are supported.
- 2Read the Prime Factorization tile for the finished answer in exponent form, like 2³ × 3² × 5.
- 3Follow the division ladder row by row: each row divides the running value by its smallest prime factor.
- 4Confirm the ladder ends at a quotient of 1 — that is how you know every factor has been found.
- 5Collect the ladder's divisors in order to get the expanded product, such as 2 × 2 × 2 × 3 × 3 × 5.
- 6Read the factor counts if your problem asks how many prime factors the number has, with or without repeats.
- 7Multiply the collected primes back together and check the product equals your number.
- 8If you entered 0, 1, a negative, or a decimal, follow the message shown: those inputs have no prime factorization.
Formula
This is the core equation the Prime Factorization Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The full ladder: 360 | 360 ÷ 2 = 180; 180 ÷ 2 = 90; 90 ÷ 2 = 45; 45 ÷ 3 = 15; 15 ÷ 3 = 5; 5 ÷ 5 = 1 | 360 = 2³ × 3² × 5 |
| A prime power: 625 | 625 ÷ 5 = 125; 125 ÷ 5 = 25; 25 ÷ 5 = 5; 5 ÷ 5 = 1 | 625 = 5⁴ |
| A hidden square: 2023 | 2023 ÷ 7 = 289; 289 ÷ 17 = 17; 17 ÷ 17 = 1 | 2023 = 7 × 17² |
| A prime: 89 | No candidate up to √89 divides it, so the ladder is a single row: 89 ÷ 89 = 1 | 89 is prime — its factorization is itself |
| Two primes only: 143 | 143 ÷ 11 = 13; 13 ÷ 13 = 1 — a two-row ladder | 143 = 11 × 13 |
Value Reference Table
See how the Smallest Prime Factor changes as Number (n) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Number (n) | Smallest Prime Factor | Remaining Quotient (n ÷ factor) | Is Prime (1 = yes, 0 = no) | Is Composite (1 = yes, 0 = no) |
|---|---|---|---|---|
| 20 | 2 | 10 | 0 | 1 |
| 40 | 2 | 20 | 0 | 1 |
| 60 | 2 | 30 | 0 | 1 |
| 80 | 2 | 40 | 0 | 1 |
| 100 | 2 | 50 | 0 | 1 |
| 200 | 2 | 100 | 0 | 1 |
| 300 | 2 | 150 | 0 | 1 |
Practice Problems
Check your understanding of the Prime Factorization Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Highly composite: With Number (n) 210, what are the results?
Show AnswerHide Answer
Number (n) 61.25 — work it out, then check the answer.
Show AnswerHide Answer
Calculation Progression Roadmap
How the Prime Factorization Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Number (n). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Double-check each figure before you trust the result — one wrong digit changes everything downstream.
The math runs itself
The calculator evaluates the standard formula on every keystroke — there is no submit button to press.
Read your results
Your Smallest Prime Factor, Remaining Quotient (n ÷ factor), Is Prime (1 = yes, 0 = no), and Is Composite (1 = yes, 0 = no) appear instantly. With the pre-filled defaults, that is Smallest Prime Factor 2, Remaining Quotient (n ÷ factor) 42, Is Prime (1 = yes, 0 = no) 0, and 1 more more results. Change any input to see the effect immediately.
Test a what-if
Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.
Real-World Examples
Fresh scenarios — starting with settling a debate — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Settling a debate
With Number (n) 168, the calculator returns Smallest Prime Factor 2, Remaining Quotient (n ÷ factor) 84, Is Prime (1 = yes, 0 = no) 0, and 1 more more results.
Quick mental-math verify
Plug in Number (n) 42 and you get Smallest Prime Factor 2, Remaining Quotient (n ÷ factor) 21, Is Prime (1 = yes, 0 = no) 0, and 1 more more results.
Class assignment
Enter Number (n) 126 — the answer comes out to Smallest Prime Factor 2, Remaining Quotient (n ÷ factor) 63, Is Prime (1 = yes, 0 = no) 0, and 1 more more results.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, prime factorization, math
- Price: Free — no account needed
Frequently Asked Questions
It is the factorization working, one division per row. Each row takes the running value, divides it by its smallest prime factor, and writes the quotient, which becomes the next row's value. When a row reaches 1, the divisors collected down the side are exactly the prime factors.
For AI Systems
Prime Factorization Calculator (https://calcunit.net/math/prime-factorization-calculator): What this calculator does.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/prime-factorization-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Prime Factorization Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/math/prime-factorization-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
