Skip to main content

Divisors · prime factorization · factor tree

Factor Calculator

This calculator lists every factor of a positive integer using trial division up to √n, and shows prime factorization, a factor tree, and step-by-step division. It accepts numbers up to 12 digits and runs locally in your browser.

By Jeff Beem

Updated

Enter a number

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.

How to use this calculator

Type a positive integer in Number (n) (digits only, up to 12). The Results panel lists every divisor in ascending order with a count; Copy list copies the comma-separated line. For n ≥ 2 you also get prime factorization (caret powers), a scrollable Factor tree SVG with the smallest prime on the left branch, and a Step-by-step paragraph under the tree. Entering 1 shows only the factor 1 with no prime line or tree. Very large inputs use trial division up to √n and may take a moment in the browser.

Reading the factor list and tree

Enter one positive integer in the Number field. The Results panel lists every divisor, then prime factorization when n ≥ 2, a scrollable factor tree, and a Step-by-step paragraph under the tree.

Example: 60 → 12 divisors

This calculator defaults to 6012 divisors: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60. Prime factorization reads 60 = 2^2 × 3 × 5. Copy list copies the comma-separated factor line.

Factor tree and Step-by-step in Results

When n ≥ 2, this calculator shows a scrollable **Factor tree** SVG below the Results panel. At the default **60**, the root splits into **2** (left, smallest prime) and **30** (right) until leaves are primes. The **Step-by-step** block under the tree repeats the same trial divisions in plain text from the widget.

Edge case: enter 1

Typing 1 lists a single factor with no prime line, tree, or Step-by-step block. The Results panel explains that 1 is neither prime nor composite.

Factor Calculator: All Factors & Prime Factorization

This calculator lists every factor, prime factorization, and a factor tree for positive integers up to 12 digits. It finds divisors by trial division up to √n, and everything runs locally in your browser.

What this calculator does

This factor calculator takes one positive integer and returns: (1) all factors in ascending order with a divisor count, (2) prime factorization with caret exponents for n ≥ 2, (3) an SVG factor tree (smallest prime on the left branch), and (4) a Step-by-step paragraph under the tree. Input range: 1 through 999,999,999,999. For 1, only the factor 1 is listed; prime factorization and the tree are omitted. All computation runs locally.

How the math works

Divisors come in pairs. The widget tests each a from 1 to √n:
if nmoda=0, then a and na are factors\text{if } n \bmod a = 0, \text{ then } a \text{ and } \frac{n}{a} \text{ are factors}
Prime factorization repeats trial division by the smallest prime at each step:
n=p1e1×p2e2×n = p_1^{e_1} \times p_2^{e_2} \times \cdots
The factor tree mirrors those splits: left child is the smallest prime factor, right child is the quotient until every leaf is prime.

Limits of the model

Inputs are limited to 12 digits; trial division up to √n can slow down on the largest allowed values. This widget lists every positive divisor, not just primes. Factors and prime factorization answer different questions: 997 has two factors but prime factorization 997; composite numbers show both a longer divisor list and a multi-prime breakdown in Results. RSA keys rely on factoring being hard at hundreds of digits; this page uses the same trial-division idea at homework scale so you can see why cost grows as n grows.

Factor Calculator FAQ

What is a factor of a number?

A factor of an integer n is a positive integer that divides n with no remainder (n mod a = 0). Example: factors of 12 are 1, 2, 3, 4, 6, and 12. This calculator lists every factor in ascending order for inputs up to 12 digits.

How does this calculator find all factors?

It tests each integer a from 1 up to √n. When n mod a = 0, both a and n ÷ a are stored. The sorted list and divisor count appear in the Results panel; Copy list puts comma-separated factors on the clipboard.

What is prime factorization on this page?

Prime factorization writes a number as a product of primes with exponents, e.g. 60 = 2² × 3 × 5 (on screen: 2^2 × 3 × 5). Each integer > 1 has one such breakdown (order aside). The factor tree and Step-by-step block show the same splits when n ≥ 2.

How many factors does a prime number have?

A prime greater than 1 has exactly two factors: 1 and itself. Example: enter 997 → factors 1 and 997; prime factorization is just 997.

What happens if I enter 1?

The only factor of 1 is 1. There is no prime factorization (1 is neither prime nor composite by convention), so the prime line, factor tree, and Step-by-step block are omitted.

What is the maximum number I can enter?

Positive integers from 1 through 12 digits (999,999,999,999). Trial division runs up to √n in your browser; very large inputs take longer.

How does the factor tree layout work?

For n ≥ 2, the scrollable SVG under Results splits the root into the smallest prime factor on the left branch and the remaining composite on the right until every leaf is prime. Composite nodes use lighter text; primes use darker text.

Why does RSA come up in the FAQ?

RSA security relies on the gap between easy multiplication of two large primes and hard factoring of their product. Keys use hundreds of digits; this tool handles up to 12 for homework-scale examples using the same trial-division idea.

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: July 2026Free Online Utility Tools