Skip to content

DIY Cost Tools

Prime Factorization Calculator

Break a whole number into prime factors, with repeated-factor and exponent forms. The prefilled example shows a useful result immediately.

Enter an integer from 2 to 1,000,000,000. Decimals, negative values, zero, and one are excluded.

Prime factors—
Exponent form—
Factors counted with repetition—

How to use

Enter the required numbers, then select Calculate. Invalid inputs clear previous results and show an explanation. Answers display up to ten significant digits unless an exact integer factorization is shown.

Formula and explanation

Repeatedly divide by prime factors, beginning with 2, then test odd candidates while p² ≤ the remaining number. Any remaining value greater than 1 is prime. Group repeated factors as pᵏ. Multiplying the resulting prime powers reconstructs the input.

Worked example

360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. There are six factors when repetitions are counted.

Important limitations

Limited to one billion to keep trial division responsive on mobile devices. This is not intended for cryptographic-size integers. The result counts factors with repetition, not the total number of divisors. One has an empty prime factorization but is intentionally excluded from this interface.

Frequently asked questions

What happens if the input is prime?

The number itself is returned as its only prime factor.

Is 1 prime?

No. Prime numbers are integers greater than 1 with exactly two positive divisors.

Does factor order matter?

No. Factors are displayed in ascending order for readability.

What does 2^3 mean?

Three copies of the factor 2: 2 × 2 × 2.

Review notes

Reviewed October 1, 2026. Default outputs and boundary cases were independently checked. Blank, nonfinite, excessive, and calculator-specific invalid inputs were tested before publication. This is an educational tool; verify precision and domain assumptions for professional use.

Related calculators