Math

Prime Factorization Calculator

Break a positive whole number into its prime factors and show repeated factors as powers.

Exact method explained belowEditable inputs
Calculation notebook
Calculation notebook

The formula and worked example below explain the calculation.

See the method

Enter your values

Runs on your device

Your answer

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter whole number.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
Whole numberNumeric value. Minimum: 2.360

Result for these sample inputs

2^3 × 3^2 × 5
Original number
360
Distinct prime factors
3

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

The method, explained

Repeatedly divide by each candidate factor beginning at 2. After removing a factor completely, continue until the candidate squared exceeds the remaining value. Any remainder above 1 is prime.

A WORKED EXAMPLE

360 = 2³ × 3² × 5. Multiplying those factors gives 360.

What to keep in mind

Accepts whole numbers from 2 through one trillion. Zero, one, negative numbers and fractions are outside the supported domain.

Common questions

What happens when the number is prime?

The output is the original number because it has no smaller prime factors.

Is 1 a prime number?

No. Prime numbers have exactly two positive divisors; 1 has only one.

Methodology maintained by ClarityKit. How these tools are built and checked.