Skip to main content

Factor Calculator

Find all factors of any integer.

By Jeff Beem

Updated

Factor calculator

Enter a positive integer (up to 12 digits). We find all factors and the prime factorization.

Results
All factors12 divisors

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60

Prime factorization

60 = 2^2 × 3 × 5

Step-by-step

First, we divide 60 by the smallest prime, 2. 60 ÷ 2 = 30 (2 times). Next, we divide 15 by 3 (once). Next, we divide 5 by 5 (once). So the prime factorization is: 60 = 2^2 × 3 × 5.

When and How to Use the Factor Calculator

Enter one positive integer (up to 12 digits). Definitions, method, and RSA context are in the article below.

Workflow Tips

All Factors

Enter a number; the tool lists every divisor in ascending order.

Prime Factorization

View the number as a product of primes with exponents in the results panel.

Factor Tree

Check the diagram to see how the number splits into factors until primes.

Step-by-Step

Read the explanation below the tree for teaching or checking your work.

Factor Calculator: All Factors & Prime Factorization

Free factor calculator: find all factors of any integer, prime factorization, and factor tree. How to find all factors of a number, list factors of 60, prime factorization calculator. n mod a = 0 up to √n. Teaching and RSA context.

How the Math Works

The calculator uses trial division to find every factor of a number. It checks each integer a from 1 up to the square root of n:
if nmoda=0, then both a and na are factors\text{if } n \bmod a = 0, \text{ then both } a \text{ and } \frac{n}{a} \text{ are factors}
This halves the search space because factors come in pairs that multiply to n. For prime factorization, the algorithm repeatedly divides by the smallest prime:
60=22×3×560 = 2^2 \times 3 \times 5
  • n (Input):
    Positive integer up to 12 digits
  • a (Trial divisor):
    Tested from 1 to √n; paired with n/a
  • n mod a:
    Remainder after dividing n by a; zero means a is a factor

Worked example: Find all factors of 60.

  • √60 ≈ 7.75, so test a = 1–7
  • a = 1 → 60/1 = 60 → pair (1, 60)
  • a = 2 → 60/2 = 30 → pair (2, 30)
  • a = 3 → 60/3 = 20 → pair (3, 20)
  • a = 4 → 60/4 = 15 → pair (4, 15)
  • a = 5 → 60/5 = 12 → pair (5, 12)
  • a = 6 → 60/6 = 10 → pair (6, 10)
  • a = 7 → 60 mod 7 ≠ 0, skip

All factors: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 (12 factors total). Prime factorization: 2² × 3 × 5.

How to Use This Calculator

Type a positive integer into the input field—the calculator accepts values up to 12 digits (999 999 999 999). Results appear instantly: a sorted list of every factor, the prime factorization with exponents, and an interactive factor tree that shows how the number splits into smaller factors until only primes remain. Below the tree, a step-by-step explanation walks through each trial division so you can verify the work or follow along for homework. For quick exploration, try numbers with many factors (like 360 or 720) to see large factor lists and deep factor trees, or try primes (like 997) to confirm they have only two factors.

What This Calculator Does & Who It's For

Calculator Purpose & Ideal Users

This factor calculator finds every factor of a single positive integer and its prime factorization, ideal when you need to list all factors or get a prime factorization for homework or teaching.
  • What You'll Get:
    All factors: Every integer a such that n mod a = 0, listed in order (e.g. list factors of 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60). Prime factorization: The number as a product of primes (e.g. 2³ × 3 × 5). Factor tree: An SVG diagram showing how the number splits into factors until primes. Step-by-step: A short explanation of the division steps.
  • Ideal Users:
    Students & teachers: Number theory, what are factors in math, primes, factor trees. Homework: "Find all factors of 60" or "Write the prime factorization." Curious readers: RSA and why factoring large numbers is hard. Use as a prime factorization calculator or to find all factors of a number.
  • Scope & Limits:
    Positive integers only, up to 12 digits. Trial division up to √n; no imaginary or decimal inputs.

What Is a Factor? Definition and n mod a = 0

A factor of an integer n is a positive integer a that divides n evenly, i.e. the remainder is zero. In other words:
n mod a = 0
(or n = a × k for some integer k). For example, the factors of 12 are 1, 2, 3, 4, 6, and 12. To find all factors of a number, it is enough to check a from 1 up to √n: whenever n mod a = 0, both a and n ÷ a are factors. This factor calculator uses that method for integers up to 12 digits.

Prime Numbers and Prime Factorization

A prime number is an integer greater than 1 whose only positive divisors are 1 and itself (e.g. 2, 3, 5, 7). Prime factorization is writing a number as a product of primes raised to powers, e.g.
60 = 2² × 3¹ × 5¹
(the prime factorization of 60). By the fundamental theorem of arithmetic, every integer greater than 1 has a unique prime factorization (up to the order of factors). This prime factorization calculator finds that factorization using trial division: divide by the smallest prime repeatedly until the quotient is 1 or prime.

The RSA Challenge: Why Factoring Is Hard

In RSA and similar cryptosystems, security relies on the fact that multiplying two large primes is easy, but factoring their product back into primes is computationally very hard. So the "one-way" nature of factoring is what makes the system secure. In practice, RSA uses numbers with hundreds of digits; even the best known algorithms cannot factor them in reasonable time. This factor calculator handles integers up to 12 digits, enough for teaching factors, prime factorization, and factor trees, and illustrates the same trial-division idea that underpins understanding of the RSA challenge.

Factor Calculator FAQ

What is a factor of a number?

A factor of an integer n is any positive integer a such that n is divisible by a with no remainder, i.e. n mod a = 0. For example, the factors of 12 are 1, 2, 3, 4, 6, and 12. This factor calculator finds every factor of a single number up to 12 digits using trial division up to √n.

What is prime factorization?

Prime factorization is writing a number as a product of prime numbers raised to powers, e.g. 60 = 2² × 3 × 5. Every integer greater than 1 has a unique prime factorization (up to order). This calculator shows the prime factorization and a factor tree so you can see how the number breaks down into primes.

How do you find all factors of a number?

To find every factor of n, check all integers a from 1 up to √n: if n mod a = 0, then both a and n ÷ a are factors. That way you only need to loop up to √n instead of n. This factor calculator uses that method and lists factors in ascending order.

Why is prime factorization important? (RSA and cryptography)

Prime factorization is hard for very large numbers: multiplying two large primes is easy, but factoring their product back into primes is computationally difficult. That one-way asymmetry is the basis of RSA and other public-key cryptosystems. In practice, RSA uses numbers so large that even the best algorithms cannot factor them in reasonable time; this calculator handles integers up to 12 digits for teaching and small-number use.

What is the maximum number I can enter?

This calculator accepts positive integers up to 12 digits (999,999,999,999). It uses trial division up to the square root of the number, so larger inputs would slow down. For arbitrary-precision factoring or very large numbers, use a dedicated big-number or prime-factorization tool.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools