GCF and LCM Calculator

Find the greatest common factor and least common multiple of two numbers.

Results will appear here.
Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result

Planning estimate only, not financial, tax, or legal advice. Verify assumptions and current rules before making decisions.

This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Direct answer

What does this calculator estimate?

A GCF/LCM calculator finds the greatest common factor and least common multiple of two positive integers. Enter two numbers to see both at once.

  • GCF via the Euclidean algorithm
  • LCM = a × b ÷ GCF(a, b)
  • Requires positive integers

What GCF and LCM mean

The greatest common factor is the largest number that divides both inputs exactly; the least common multiple is the smallest positive number both divide into exactly. They're the building blocks for simplifying fractions and finding common denominators.

Limitations to watch for

The tool accepts two positive integers only — decimals and negatives are rejected. The Euclidean algorithm is exact and fast even for large inputs, but very large numbers can overflow display precision. GCF and LCM for more than two numbers require pairwise application.

How to use it in practice

Use the GCF to reduce fractions to lowest terms (divide numerator and denominator by it). Use the LCM to find a common denominator when adding fractions or to schedule repeating events (e.g., when two cycles align).

['Enter two positive integers.', "The tool computes the GCF via Euclid's algorithm.", 'LCM = a × b ÷ GCF is shown alongside.']

What GCF and LCM are

The greatest common factor is the largest number dividing both inputs; the least common multiple is the smallest number both divide into. For 12 and 18: GCF 6, LCM 36. The calculator returns both instantly.

How they're computed

Prime factorization finds the shared primes (GCF) and the union of primes (LCM). The Euclidean algorithm computes GCF efficiently for large numbers; LCM = a × b ÷ GCF. The calculator uses the standard methods.

Everyday uses

GCF simplifies fractions (12/18 → 2/3 via GCF 6); LCM aligns repeating schedules (an event every 4 days and one every 6 days align every 12 days) and finds common denominators. Both show up constantly in practical math.

A worked example

For 24 and 36: GCF 12, LCM 72. For 15 and 20: GCF 5, LCM 60. The calculator returns the pair from any inputs.

Multiple inputs

For more than two numbers, extend the method step by step: GCF(8,12,16) = 4. The calculator handles pairs; larger sets chain the same logic.

Transparent methodology

How this calculator works

Reviewed 2026-08-25 · BoringToolsKit Editorial Team

Formula

Greatest common factor (GCF) via the Euclidean algorithm: repeatedly replace (x, y) with (y, x mod y) until y = 0; the last x is the GCF. Least common multiple: LCM = a × b ÷ GCF(a, b).

Worked example

For 12 and 18: GCF = 6 (12 = 2²×3, 18 = 2×3²), LCM = 12 × 18 ÷ 6 = 36.

Assumptions to verify

  • Both inputs are positive integers.
  • Standard definitions of GCF and LCM apply.
  • Results are exact integers.

Frequently asked questions

What is the greatest common factor (GCF)?

The largest number that divides both inputs exactly. For 12 and 18, the GCF is 6.

What is the least common multiple (LCM)?

The smallest positive number that both inputs divide exactly. For 12 and 18, the LCM is 36.

How is the GCF computed?

With the Euclidean algorithm: keep replacing the pair (x, y) with (y, x mod y) until y = 0; the remaining x is the GCF. It's fast and exact.

How is the LCM related to the GCF?

LCM(a, b) = a × b ÷ GCF(a, b). If you know one, you can compute the other.

Why use the GCF?

To simplify fractions: divide numerator and denominator by their GCF to get lowest terms (e.g., 12/18 → 2/3).

Why use the LCM?

To add or subtract fractions with different denominators, or to find when repeating events coincide (e.g., every 4 days and every 6 days → every 12 days).

Do GCF and LCM work for more than two numbers?

Yes, by applying them pairwise: GCF(a, b, c) = GCF(GCF(a, b), c), and likewise for LCM.

What is the GCF?

The largest number that divides both inputs — 6 for 12 and 18.

What is the LCM?

The smallest number both divide into — 36 for 12 and 18.

How are they related?

LCM × GCF = a × b for two numbers.

What are they used for?

Simplifying fractions (GCF) and aligning schedules or denominators (LCM).

Cite this tool

BoringToolsKit. “GCF and LCM Calculator.” boringtoolskit.com/gcf-lcm-calculator/ (reviewed 2026-08-25). Free to reference in articles, syllabi, and answer posts with a link.

Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.