Factor Calculator — Step-by-Step Solutions
The Factor Calculator finds all factors of a number, its prime factorisation, and factor pairs. It can also compute the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two numbers.
Enter any positive integer to see its complete factorisation. The calculator uses trial division for efficient computation and displays results clearly.
Your calculations will appear here
How to Use the Factor Calculator
- Choose a mode from the selector at the top: All Factors lists every divisor of a number, Prime Factorisation breaks a number into its prime building blocks, Factor Pairs shows pairs that multiply to give the number, GCD finds the greatest common divisor of two numbers, and LCM finds the least common multiple.
- For All Factors, Prime Factorisation, and Factor Pairs, enter a single positive integer. For GCD and LCM, enter two positive integers.
- Results appear instantly as you type. Click "Show steps" to see the working, rendered with proper mathematical notation. In Prime Factorisation mode, an interactive factor tree diagram is also displayed.
- Use the Share button to copy a link that pre-fills the calculator with your current inputs and mode.
- The factor tree highlights prime numbers in blue. Each level splits a composite number into its smallest prime factor and the remaining quotient until only primes remain.
Formula and Theory
A factor (or divisor) of a positive integer n is any positive integer that divides n without leaving a remainder. Every positive integer has at least two factors: 1 and itself. Numbers with exactly two factors are called prime numbers, while numbers with more than two factors are called composite numbers.
Prime factorisation expresses a composite number as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every integer greater than 1 has a unique prime factorisation (up to the order of the factors). This decomposition is the foundation for many results in number theory.
The Greatest Common Divisor (GCD) of two integers is the largest positive integer that divides both numbers. The Euclidean algorithm computes it efficiently by repeatedly replacing the larger number with the remainder of dividing the two, until the remainder is zero. The last non-zero remainder is the GCD.
The Least Common Multiple (LCM) of two integers is the smallest positive integer divisible by both. It is related to the GCD by the identity LCM(a, b) = (a * b) / GCD(a, b). This relationship makes computing the LCM straightforward once the GCD is known.
Worked Examples
Example 1: Finding all factors of 36
Problem: List every positive integer that divides 36.
Solution: Test integers from 1 to sqrt(36) = 6. 36 / 1 = 36, 36 / 2 = 18, 36 / 3 = 12, 36 / 4 = 9, 36 / 6 = 6. Collect both divisor and quotient.
Answer: 1, 2, 3, 4, 6, 9, 12, 18, 36
Example 2: Prime factorisation of 180
Problem: Express 180 as a product of prime factors.
Solution: 180 / 2 = 90, 90 / 2 = 45, 45 / 3 = 15, 15 / 3 = 5, 5 is prime.
Answer: 2^2 * 3^2 * 5
Example 3: Factor pairs of 24
Problem: Find all pairs (a, b) where a * b = 24.
Solution: Test from 1 upward: 1 * 24, 2 * 12, 3 * 8, 4 * 6. Stop when a > sqrt(24).
Answer: (1, 24), (2, 12), (3, 8), (4, 6)
Example 4: GCD of 48 and 36
Problem: Find the greatest common divisor of 48 and 36 using the Euclidean algorithm.
Solution: gcd(48, 36): 48 / 36 = 1 remainder 12. gcd(36, 12): 36 / 12 = 3 remainder 0. The last non-zero remainder is 12.
Answer: 12
Example 5: LCM of 15 and 20
Problem: Find the least common multiple of 15 and 20.
Solution: First find GCD(15, 20) = 5. Then LCM = (15 * 20) / 5 = 300 / 5.
Answer: 60
Frequently Asked Questions
What is the difference between a factor and a multiple?
Is 1 a prime number?
How does the Euclidean algorithm work?
Why is prime factorisation unique?
Can I use GCD and LCM with more than two numbers?
Related General Calculators
Percentage Calculator
Calculate percentages instantly. Find what percent of a number, percentage change, and percentage difference. Free and fast.
Fraction Calculator
Add, subtract, multiply, and divide fractions. Simplify fractions and convert to mixed numbers. Free online fraction calculator.
Ratio Calculator
Simplify ratios and find missing values in proportions. Free online ratio calculator with step-by-step results.
Exponent Calculator
Calculate powers and exponents instantly. Compute base raised to any power including negative and fractional exponents. Free online tool.
Log Calculator
Calculate logarithms with any base. Find natural log (ln), log base 10, and custom base logarithms. Free online log calculator.
Scientific Calculator
Free online scientific calculator with trigonometry, logarithms, exponents, and more. Works like a physical calculator. No download needed.