Quick answer
The common factors of two numbers are the divisors of their greatest common factor. 12 and 18 share the factors 1, 2, 3 and 6, with GCF 6.
Enter two positive integers. The calculator returns all common factors and the GCF.
Related tools: Factor Calculator: List every factor of a positive whole number. Common Multiple Calculator: First common multiples of two numbers. Slope Calculator: Slope, angle, distance and line equation through two points.
How to use the Common Factor Calculator
- Enter first number (a whole number, between 1 and 1000000000).
- Enter second number (a whole number, between 1 and 1000000000).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| First number | A whole number | ≥ 1, ≤ 1000000000 |
| Second number | A whole number | ≥ 1, ≤ 1000000000 |
Formula and method
Formula
common factors = divisors of gcd(a, b)
IEEE-754 double precision; shown to at most 6 decimal places.
Every common factor divides the GCD.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: First number = 12; Second number = 18.
| Result | Value |
|---|---|
| Common factors | 1, 2, 3, 6 |
| GCF | 6 |
Example 2
Inputs: First number = 7; Second number = 13.
| Result | Value |
|---|---|
| Common factors | 1 |
| GCF | 1 |
The first line is the headline result (common factors). Below it the common Factor Calculator lists gCF, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Why GCF divisors
Every common factor of a and b divides gcd(a, b), and every divisor of the GCD divides both numbers. So list the divisors of 6: 1, 2, 3, 6.
Uses
Common factors help to simplify fractions: 12/18 reduces by dividing both by 6 to 2/3. Coprime numbers share only the factor 1.
How the result changes with first number
Holding every other input at the first worked example, this table changes only first number. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| First number | Common factors | GCF |
|---|---|---|
| 6 | 1, 2, 3, 6 | 6 |
| 12 | 1, 2, 3, 6 | 6 |
| 24 | 1, 2, 3, 6 | 6 |
| 48 | 1, 2, 3, 6 | 6 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- First number: entering "0" shows "First number must be at least 1." beside that field and no result.
Choosing between the Common Factor Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Factor Calculator](/math/factor-calculator/) | number | Factors |
| [Common Multiple Calculator](/math/common-multiple/) | first number and second number | First five common multiples |
| [Slope Calculator](/math/slope-calculator/) | x₁, y₁ and x₂ | Slope |
| [LCM Calculator](/math/lcm-calculator/) | numbers | Least common multiple |
| [Quadratic Formula Calculator](/math/quadratic-formula-calculator/) | a, b and c | Roots |
Background: algebra
Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.
If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.
Assumptions and limitations
- Positive integers
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for first number to confirm this.
Frequently asked questions
What are the common factors of 8 and 12?
The common factors of 8 and 12 are 1, 2 and 4, with GCF 4.
What is coprime?
Numbers whose only common factor is 1.
Is the GCF always one of the common factors?
Yes, it is the largest of them; every other common factor divides the GCF.
What does the Common Factor Calculator calculate?
All common factors of two numbers. It returns Common factors and GCF.
What formula does the Common Factor Calculator use?
common factors = divisors of gcd(a, b). Every common factor divides the GCD.
What do I need to enter in the common Factor Calculator?
You enter First number and Second number.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Positive integers.
What is an example of a common Factor result?
With first number 12 and second number 18, the common factors is 1, 2, 3, 6.
Related calculators
- Factor Calculator — List every factor of a positive whole number.
- Common Multiple Calculator — First common multiples of two numbers.
- Slope Calculator — Slope, angle, distance and line equation through two points.
- LCM Calculator — Least common multiple of two or more numbers.
- Quadratic Formula Calculator — Solve ax² + bx + c = 0, including complex roots.
- Log Calculator — Logarithm of a number to any base.
- Antilog Calculator — Inverse logarithm: raise a base to a power.
- Average Rate of Change Calculator — Average rate of change between two points.
- System of Equations Calculator — Solve two linear equations in two unknowns.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.