Factor Calculator

All factors and factor pairs of a whole number, with its prime factorization and whether it is prime.

Enter details

Factors

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Factor pairs
1×360, 2×180, 3×120, 4×90, 5×72, 6×60, 8×45, 9×40, 10×36, 12×30, 15×24, 18×20
Number of factors
24
Prime factorization
2^3 × 3^2 × 5
Prime number?
No

Formula: Test divisors d from 1 to √n; each d dividing n gives the pair (d, n/d)

Factor Calculator: Find Factors & Factor Pairs

Short answer

The Factor Calculator determines all integer divisors, factor pairs, prime factorization, and primality for any positive whole number. For an input of 360, it identifies 24 total factors ranging from 1 to 360, yielding 12 distinct factor pairs and a prime factorization of 2^3 × 3^2 × 5, confirming 360 is a composite number.

Formula

Test divisors d from 1 to √n; each d dividing n gives the pair (d, n/d)

The tool identifies factors by evaluating test divisors d starting at 1 up to the square root of the integer n (floor(√n)). If d divides n without a remainder (meaning n mod d = 0), both d and the quotient n/d are recorded as factors, forming the factor pair (d, n/d). Here, n represents the target whole number, d represents the trial divisor, and n/d represents the paired complementary quotient. This method guarantees complete discovery of all divisors in O(√n) arithmetic steps.

Worked example

Number
360
  • Factors: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
  • Factor pairs: 1×360, 2×180, 3×120, 4×90, 5×72, 6×60, 8×45, 9×40, 10×36, 12×30, 15×24, 18×20
  • Number of factors: 24
  • Prime factorization: 2^3 × 3^2 × 5
  • Prime number?: No

How the Factor Calculator Works

Finding the factors of an integer is a fundamental concept in arithmetic, number theory, and practical mathematics. A factor—also referred to as a divisor—is any whole number that divides into another whole number without leaving a remainder. The Factor Calculator takes a single positive integer $n$ and systematically calculates every positive factor, groups them into factor pairs, computes the prime factorization in exponential notation, tallies the total divisor count, and evaluates whether the number is prime or composite.

To accomplish this efficiently, the calculator does not test every number between $1$ and $n$. Instead, it implements a standard divisor pairing algorithm based on trial division bounded by the square root of $n$.

The Trial Division Algorithm

Consider an integer $n$. If an integer $d$ divides $n$ evenly, then there exists a complementary integer $q$ such that:

$$d \times q = n$$

In this relationship, $q = \frac{n}{d}$. If both $d$ and $q$ were strictly greater than $\sqrt{n}$, their product $d \times q$ would be strictly greater than $\sqrt{n} \times \sqrt{n} = n$, which is a contradiction. Consequently, in every factor pair $(d, q)$, at least one factor must be less than or equal to $\sqrt{n}$.

The algorithm operates as follows:

  1. Evaluate integers $d$ starting from $1$ up to $\lfloor\sqrt{n}\rfloor$.
  2. Compute the modulo operation $n \pmod d$.
  3. If $n \pmod d = 0$, record $d$ as a factor, and compute the corresponding quotient $q = \frac{n}{d}$.
  4. If $d \neq q$, record $q$ as an additional factor.
  5. Sort the collected factors in ascending order.
  6. Format each $(d, q)$ as a factor pair.

Prime Factorization and Factor Counts

Beyond simple divisors, the calculator applies trial division using prime numbers to derive the prime factorization. By the Fundamental Theorem of Arithmetic, every integer $n > 1$ can be represented uniquely as a product of prime powers:

$$n = p_1^{a_1} \times p_2^{a_2} \times \dots \times p_k^{a_k}$$

Where each $p_i$ is a distinct prime number and each $a_i$ is a positive integer exponent. Using this prime representation, the total number of positive factors, denoted as $\tau(n)$ or $d(n)$, is derived via the divisor function:

$$\tau(n) = (a_1 + 1)(a_2 + 1) \dots (a_k + 1)$$

If $\tau(n) = 2$, the number has only two divisors ($1$ and itself), meaning it is prime. If $\tau(n) > 2$, the number is composite.


Step-by-Step Worked Example

To illustrate the exact mechanics, we trace the tool's process using the integer input $360$.

Input

  • Number ($x$): $360$

Step 1: Establish the Upper Bound

First, calculate the square root of the target value to establish the trial division boundary:

$$\sqrt{360} \approx 18.9737$$ $$\lfloor\sqrt{360}\rfloor = 18$$

We only need to evaluate candidate divisors $d$ from $1$ through $18$.

Step 2: Test Divisors from 1 to 18

We divide $360$ by each integer $d$ from $1$ to $18$ to see if the remainder is zero:

  • $360 \div 1 = 360$ (remainder $0$) $\rightarrow$ Pair: $(1, 360)$
  • $360 \div 2 = 180$ (remainder $0$) $\rightarrow$ Pair: $(2, 180)$
  • $360 \div 3 = 120$ (remainder $0$) $\rightarrow$ Pair: $(3, 120)$
  • $360 \div 4 = 90$ (remainder $0$) $\rightarrow$ Pair: $(4, 90)$
  • $360 \div 5 = 72$ (remainder $0$) $\rightarrow$ Pair: $(5, 72)$
  • $360 \div 6 = 60$ (remainder $0$) $\rightarrow$ Pair: $(6, 60)$
  • $360 \div 7 = 51.428...$ (remainder $3$) $\rightarrow$ Not a factor
  • $360 \div 8 = 45$ (remainder $0$) $\rightarrow$ Pair: $(8, 45)$
  • $360 \div 9 = 40$ (remainder $0$) $\rightarrow$ Pair: $(9, 40)$
  • $360 \div 10 = 36$ (remainder $0$) $\rightarrow$ Pair: $(10, 36)$
  • $360 \div 11 = 32.727...$ (remainder $8$) $\rightarrow$ Not a factor
  • $360 \div 12 = 30$ (remainder $0$) $\rightarrow$ Pair: $(12, 30)$
  • $360 \div 13 = 27.692...$ (remainder $9$) $\rightarrow$ Not a factor
  • $360 \div 14 = 25.714...$ (remainder $10$) $\rightarrow$ Not a factor
  • $360 \div 15 = 24$ (remainder $0$) $\rightarrow$ Pair: $(15, 24)$
  • $360 \div 16 = 22.5$ (remainder $8$) $\rightarrow$ Not a factor
  • $360 \div 17 = 21.176...$ (remainder $3$) $\rightarrow$ Not a factor
  • $360 \div 18 = 20$ (remainder $0$) $\rightarrow$ Pair: $(18, 20)$

Step 3: Compile Factor Pairs and Divisor List

Collecting the paired outputs produces the complete set of factor pairs: $$1\times360, 2\times180, 3\times120, 4\times90, 5\times72, 6\times60, 8\times45, 9\times40, 10\times36, 12\times30, 15\times24, 18\times20$$

Ordering all unique values sequentially yields $24$ distinct factors: $$1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360$$

Step 4: Determine Prime Factorization

Extracting prime components by repeated division:

  • $360 \div 2 = 180$
  • $180 \div 2 = 90$
  • $90 \div 2 = 45$ (three factors of $2$)
  • $45 \div 3 = 15$
  • $15 \div 3 = 5$ (two factors of $3$)
  • $5 \div 5 = 1$ (one factor of $5$)

Thus, the prime factorization is: $$2^3 \times 3^2 \times 5$$

Using the divisor counting formula: $$\tau(360) = (3 + 1)(2 + 1)(1 + 1) = 4 \times 3 \times 2 = 24$$

Because $360$ has $24$ factors, it is composite, confirming that the answer to "Prime number?" is No.


How to Interpret Your Results

The calculator displays five key outputs that provide structural insight into your input number:

1. Factors

This line displays the full list of all integers that divide your input evenly. These numbers always start with $1$ and end with the input value itself. In geometry, these values represent every whole-number side length possible for a rectangle whose area equals the input number.

2. Factor Pairs

Factor pairs display the exact two-number multiplications that reconstruct your original value ($a \times b = n$). In real-world problems like packaging, tile layouts, or array configurations in computer science, factor pairs show every two-dimensional grid arrangement that can hold that exact number of units.

3. Number of Factors

This total count indicates how composite a number is. Highly composite numbers—numbers that have more divisors than any smaller positive integer—frequently serve as standards in measurement systems. For example, $360$ has $24$ factors, which is why ancient astronomers divided circles into $360$ degrees: it can be cleanly partitioned into halves, thirds, quarters, fifths, sixths, eighths, tenths, twelfths, and more.

4. Prime Factorization

Expressed with bases and exponents, prime factorization identifies the irreducible prime components of the integer. In arithmetic, this expression is the primary tool used for finding the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) across multiple values.

5. Prime Number Status

A value of "Yes" indicates that the number has exactly two factors ($1$ and itself). A value of "No" confirms that the number has three or more divisors, classifying it as composite.


Practical Tips

  • Use Divisibility Rules for Fast Mental Checks: Before checking a computer tool, apply common divisibility shortcuts. A number is divisible by $2$ if it ends in an even digit, by $3$ if the sum of its digits is divisible by $3$, by $4$ if its last two digits form a multiple of $4$, and by $5$ if it ends in $0$ or $5$.
  • Verify Factor Counts via Exponents: To confirm you have not missed any divisors during manual homework calculations, perform prime factorization first. Add $1$ to every prime exponent and multiply those sums together. The result tells you precisely how many total factors you must locate.
  • Recognize Perfect Squares by Factor Counts: If a number has an odd number of factors, it is a perfect square. For instance, $36$ has $9$ factors ($1, 2, 3, 4, 6, 9, 12, 18, 36$), because $6 \times 6$ pairs with itself. If your factor count is even, your number is not a perfect square.
  • Simplifying Fractions: When reducing fractions such as $\frac{45}{360}$, inspect the shared factor lists of the numerator and denominator. Identifying the greatest common factor immediately reduces the fraction to lowest terms in a single cancellation step.
  • Modular Arithmetic and Cryptography: Divisor algorithms form the mathematical backbone of modern encryption standards, such as RSA cryptography, which rely on the computational difficulty of factoring extremely large integers into their prime constituents.

Comparison

ScenarioInputResult
Base exampleDefault inputsFactors: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Common mistakes

  • Testing divisors past the square root of n, which duplicates work and increases calculation time.
  • Omitting the trivial factors 1 and the number n itself from the final set of divisors.
  • Assuming an odd number cannot have factors or is automatically prime without checking odd divisors.
  • Confusing prime factors with the complete set of integer factors or divisors.
  • Forgetting to pair a divisor d with n/d, leading to missing intermediate factors above the square root.

Checklist

  • Verify that the input value is a positive integer greater than zero.
  • Determine the integer square root of the number to establish the stopping threshold.
  • Systematically test integers from 1 up to the square root for zero remainder.
  • Record both the trial divisor and its complementary quotient for every clean division.
  • Eliminate duplicate values if the number is a perfect square where d equals n/d.
  • Order the resulting factors sequentially from smallest to largest for easy review.
Michael Torres

Michael Torres

Co-Founder & Chief Editor

Michael Torres writes about personal finance, loans, and savings for the financial blog The Money Leads.

More about MichaelRead on The Money LeadsLast reviewed:

This calculator provides exact mathematical outputs for educational and analytical purposes. For academic assignments or cryptographic applications, verify calculations against formal mathematical standards and software benchmarks.

Frequently Asked Questions

What is the difference between a factor and a multiple?

A factor is an integer that divides evenly into another number without leaving a remainder. In contrast, a multiple is the product of that number multiplied by an integer. For example, 12 is a factor of 360 because 360 divided by 12 equals 30 exactly. Conversely, 720 is a multiple of 360 because 360 multiplied by 2 equals 720. Factors are always less than or equal to the original number, whereas multiples are equal or greater.

Why does the algorithm stop checking at the square root of n?

Every factor pair (a, b) multiplying to n consists of at least one number less than or equal to the square root of n. If both a and b were strictly greater than the square root of n, their product would exceed n. By testing all integers up to the square root, you find every smaller factor a and instantly compute its paired factor b via division. Checking beyond the square root only rediscovers previously identified values in reverse order.

How does prime factorization relate to all factors of a number?

Prime factorization breaks a number down into its fundamental building blocks consisting entirely of prime numbers. Every factor of that number is formed by a unique combination of those prime factors raised to powers between zero and their maximum exponent. For 360, whose prime factorization is 2^3 × 3^2 × 5, the total number of factors is calculated by multiplying one plus each exponent: (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24 factors.

Can negative numbers have factors?

Yes, negative numbers have negative and positive integer factors. In standard arithmetic and elementary number theory, calculators typically focus on positive factors because the negative counterparts are simply the negative versions of the same values. For example, if 10 is a factor of 360, -10 is also an algebraic divisor because -10 multiplied by -36 equals positive 360. Unless an algebraic application requires signed divisors, standard factoring tools report the positive integers.

Is the number 1 considered a prime number or a composite number?

The number 1 is classified as neither prime nor composite; it is designated as a unit. A prime number is formally defined as an integer strictly greater than 1 that possesses exactly two distinct positive divisors: 1 and itself. A composite number has more than two distinct positive divisors. Because 1 has only one single divisor (itself), it fails both definitions. This classification preserves the uniqueness required by the Fundamental Theorem of Arithmetic.

How do you tell if a number is a perfect square using its factors?

A whole number is a perfect square if and only if it has an odd total number of factors. In non-square numbers, factors always come in distinct pairs (d, n/d). For a perfect square, one pair consists of identical integers where d equals n/d, meaning the square root is paired with itself. When listing distinct factors, that duplicate value appears only once, leaving an odd count. Numbers with an even factor count are never perfect squares.

Sources & references

Formulas are tested against hand-checked answers. How we check our calculators.

Estimates only. Confirm final figures, terms and fees with your bank, provider or a qualified professional.

Last updated: January 15, 2026