Factor Calculator
Find all factors of a given number
Category: Mathematics
Factor Calculator Inputs
Factor Calculator Formula
Equation
For a number n with prime factorization n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ, the number of factors is (a₁+1)(a₂+1)...(aₖ+1) and the sum of factors is σ(n) = ∏(pᵢ^(aᵢ+1)-1)/(pᵢ-1)
Excel Formula
=Foranumbernwithprimefactorizationn=p₁^a₁×p₂^a₂×...×pₖ^aₖ,thenumberoffactorsis(a₁+1)(a₂+1)...(aₖ+1)andthesumoffactorsisσ(n)=∏(pᵢ^(aᵢ+1)-1)/(pᵢ-1)
Variables
- Number — Enter a positive integer to find its factors
- Show Steps — Display detailed step-by-step calculation
- Include Analysis — Show additional analysis (perfect, abundant, deficient)
How the Factor Calculator Works
Factors are fundamental building blocks in number theory and play a crucial role in understanding the structure of integers. A factor (or divisor) of a number is an integer that divides the number without leaving a remainder. Understanding factors is essential for prime factorization, finding greatest common divisors, least common multiples, and solving many mathematical problems.
The core relationship is For a number n with prime factorization n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ, the number of factors is (a₁+1)(a₂+1)...(aₖ+1) and the sum of factors is σ(n) = ∏(pᵢ^(aᵢ+1)-1)/(pᵢ-1). Typical inputs include Number, Show Steps, Include Analysis.
Enter your values in the factor calculator above, review the step-by-step solution, and compare against the worked examples below so you can see how each input changes the result. This free online mathematics tool is built for homework, design checks, and professional verification.
Factor Calculator Theory & Explanation
Definition and Basic Properties
A factor of a positive integer n is any positive integer d such that n = d × k for some integer k. The number 1 and n itself are always factors of n. If n has exactly two factors (1 and n), then n is prime. If n has more than two factors, then n is composite.
d \text is a factor of n \text if n = d × k \text for some integer k
Efficient Factor Finding Algorithm
To find all factors of a number n efficiently, check all integers from 1 to √n. If i divides n, then both i and n/i are factors. This reduces the number of divisions needed from n to √n, making the algorithm much more efficient for large numbers.
\textIf i \text divides n, \text then both i \text and (n)/(i) \text are factors
Prime Factorization
Every positive integer greater than 1 can be expressed uniquely as a product of prime factors. This is known as the Fundamental Theorem of Arithmetic. The prime factorization reveals the complete structure of a number and is essential for many number theory applications.
n = p_1^a_1 × p_2^a_2 × ·s × p_k^a_k \text where p_i \text are distinct primes
Number of Factors Formula
If n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ is the prime factorization, then the total number of factors is (a₁+1)(a₂+1)...(aₖ+1). This formula works because for each prime pᵢ, we can choose its exponent from 0 to aᵢ, giving us (aᵢ+1) choices.
\textNumber of factors = (a_1+1)(a_2+1)·s(a_k+1)
Sum of Factors
The sum of all factors of n can be calculated using the formula: σ(n) = (p₁^(a₁+1)-1)/(p₁-1) × (p₂^(a₂+1)-1)/(p₂-1) × ... × (pₖ^(aₖ+1)-1)/(pₖ-1). This is useful for studying perfect numbers and other number theory concepts.
\sigma(n) = \fracp_1^a_1+1-1p_1-1 × \fracp_2^a_2+1-1p_2-1 × ·s × \fracp_k^a_k+1-1p_k-1
Perfect, Abundant, and Deficient Numbers
A number is perfect if the sum of its proper factors (factors excluding the number itself) equals the number. If the sum is greater than the number, it's abundant; if less, it's deficient. The first few perfect numbers are 6, 28, 496, and 8128.
\textPerfect: \sigma(n) = 2n, \quad \textAbundant: \sigma(n) > 2n, \quad \textDeficient: \sigma(n) < 2n
Applications in Mathematics
Factors are essential for finding greatest common divisors (GCD), least common multiples (LCM), simplifying fractions, solving Diophantine equations, and cryptography. They also appear in algebraic structures, group theory, and many areas of pure and applied mathematics.
Computational Complexity
Finding all factors of a number n has time complexity O(√n), which is efficient for most practical purposes. However, for very large numbers (hundreds of digits), more sophisticated algorithms like Pollard's rho algorithm or the quadratic sieve are used in cryptography and number theory research.
Key Mathematical Equations
The mathematical foundation of factor theory relies on several key equations: Prime factorization (n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ), number of factors formula (τ(n) = (a₁+1)(a₂+1)...(aₖ+1)), sum of factors formula (σ(n) = ∏(pᵢ^(aᵢ+1)-1)/(pᵢ-1)), and proper factor sum (s(n) = σ(n) - n). These equations enable efficient calculation and classification of numbers as perfect, abundant, or deficient.
\beginalign n &= p_1^a_1 × p_2^a_2 × ·s × p_k^a_k \\ \tau(n) &= (a_1+1)(a_2+1) ·s (a_k+1) \\ \sigma(n) &= \prod_i=1^k \fracp_i^a_i+1-1p_i-1 \\ s(n) &= \sigma(n) - n \endalign
Factor Calculator Worked Examples
Worked Example
Inputs
- number: 12
Result: 1, 2, 3, 4, 6, 12
Explanation
The factors of 12 are 1, 2, 3, 4, 6, and 12
Prime Number
Inputs
- number: 17
- show_steps: yes
- include_analysis: yes
Result: 1, 17
Explanation
17 is a prime number with exactly 2 factors: 1 and 17.
Common Factor Calculator Use Cases
- Homework and exam practice
- Engineering and science coursework
- Quick verification of hand calculations
- Factor homework and study
- Factor design and analysis
Factor Calculator FAQs
What is the difference between factors and multiples?
Factors are numbers that divide a given number (smaller than or equal to the number), while multiples are numbers that the given number divides into (larger than or equal to the number). For example, factors of 12 are 1, 2, 3, 4, 6, 12, while multiples of 12 are 12, 24, 36, 48, etc.
How do I find factors efficiently?
Use the efficient algorithm: check all integers from 1 to √n. If i divides n, then both i and n/i are factors. This reduces the number of divisions needed from n to √n, making it much faster for large numbers.
What is a perfect number and why are they special?
A perfect number is a positive integer that equals the sum of its proper factors (factors excluding the number itself). For example, 6 = 1+2+3 and 28 = 1+2+4+7+14. Perfect numbers are rare and have fascinated mathematicians for centuries. Only 51 perfect numbers are currently known.
How do I use factors to find the greatest common divisor (GCD)?
Find all factors of both numbers, then identify the largest factor that appears in both lists. For example, factors of 12 are 1,2,3,4,6,12 and factors of 18 are 1,2,3,6,9,18, so GCD(12,18) = 6. For larger numbers, use the Euclidean algorithm instead.
What are abundant and deficient numbers?
An abundant number has a sum of proper factors greater than the number itself (e.g., 12: 1+2+3+4+6 = 16 > 12). A deficient number has a sum less than the number (e.g., 8: 1+2+4 = 7 < 8). Perfect numbers have sums equal to the number.
How do I find the number of factors without listing them all?
Use the prime factorization formula. If n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ, then the number of factors is (a₁+1)(a₂+1)...(aₖ+1). For example, 12 = 2² × 3¹, so it has (2+1)(1+1) = 6 factors.
What is prime factorization and why is it important?
Prime factorization expresses a number as a product of prime factors. For example, 60 = 2² × 3 × 5. This is important because it's unique (Fundamental Theorem of Arithmetic) and useful for finding GCD, LCM, and understanding number structure.
Are there any special patterns in factors?
Yes! Factors come in pairs that multiply to give the original number (except for perfect squares). Prime numbers have exactly 2 factors. Perfect squares have an odd number of factors. The number of factors grows roughly logarithmically with the number.