Factoring Calculator


This online Factoring Calculator finds the factors of a given positive integer number. Enter the number in the input field of the calculator and click the “Calculate” button.


Number:

Factors


What is Factoring Numbers

Factors (or divisors) of an integer number are the integer numbers that, when multiplied together, produce the given number. For example, 5 and 7 are the factors of 35 because 5×7 = 35. Some numbers have more than one way of being factored. For example, 18 can be factored as 1×18, 2×9 or 3×6.

Numbers that have only 2 factors: 1 and themselves, are called prime numbers. The first few prime numbers are 2, 3, 5, 7, 11, and 13. The number 1 is not considered prime because any number is trivially divided by 1. Positive integers that can be formed by multiplying two smaller positive integers are called composite numbers.

Obviously, the factors of a number are also its divisors. For example, if the number 21 is divisible by 3 without a remainder, then the number 3, as well as the result of dividing, the number 7, are the factors of the number 21.

Worth to note that every integer number has at least two factors: 1 and the number itself. If these two factors are the only factors of a number, so, as we know, such a number is a prime number.

Thus, factorization of an integer is the process of representing that number as a product of smaller integers. In practice, we are talking about making a list of all the factors of a number, that is, the numbers from which you can make pairs of factors that, when multiplied by each other, give the original number.

How to Factor Numbers

There are many algorithms for factoring numbers, both general-purpose and special-purpose. The running time vary significantly among the algorithms, depending on the size and on the properties of the number to be factored. One of the most simple and often used in the case of not very large numbers is the trial division algorithm. And although it is the most time-consuming algorithm, its simplicity makes it applicable for many practical problems.

The basic idea of the trial division algorithm is to check if n, the integer to be factored, can be divided by every number in turn that is less than this integer. It is also important to note, that it makes no sense to consider trial factors greater than the square root of n because if n is divisible by some number p, then n = p × q, and if q is smaller than p, then it would have been detected earlier that n is divisible by q or by a prime factor of q.

So, the trial division algorithm which is used in our factoring calculator has the following steps:

1) Find the square root of the integer n to be factored and round it down to the nearest whole number. Let’s call this number the upper search limit.

2) Sequentially divide the number n by numbers from 1 to the upper search limit. If division occurs without a remainder, then the divisor and the result of the division are factors of the number n.

Example of Trial Division.

Let’s factorize the number 12.

1) The square root of 12 is equal to 3.4641. Round down it to the whole number 3.

2) Divide 12 first by 1 (so we get the trivial pair of factors: 1 and 12). Then divide 12 by 2 (and get the second pair of factors: 2 and 6), and divide 12 by 3 (and get the third pair of factors: 3 and 4).

So, as a result, we get the following set of factors of the number 12: 1, 2, 3, 4, 6, 12.


Related calculators

Check out our other math calculators such as Greatest Common Divisor Calculator or Least Common Multiple Calculator.