GCD & LCM Calculator

Calculate Greatest Common Divisor and Least Common Multiple. See prime factorizations and all factors for multiple numbers.

7,000 AI Tokens Used
Feb 2, 2026 Created
mathcalculator
Categories
Try:
GCD
Greatest Common Divisor
6
LCM
Least Common Multiple
36

Prime Factorizations

12=2^2 × 3
18=2 × 3^2

All Factors

12:
1234612
18:
1236918

Highlighted factors are common to all numbers (divisors of GCD)

About GCD & LCM

GCD (Greatest Common Divisor)

The largest positive integer that divides each of the numbers without a remainder. Also called HCF (Highest Common Factor).

LCM (Least Common Multiple)

The smallest positive integer that is divisible by each of the numbers. Useful for adding fractions with different denominators.

GCD(a, b) × LCM(a, b) = |a × b|

How This Tool Was Built

This tool was created entirely by AI. Here's the exact prompt used to generate it:

Prompt Used
Create a GCD & LCM Calculator tool with these features:

1. Input for multiple numbers (comma or space separated)
2. Example buttons with common number sets
3. Results showing GCD and LCM with copy buttons
4. Prime factorization for each number
5. List all factors for each number
6. Highlight common factors
7. Educational info about GCD and LCM
8. Show the mathematical relationship formula

Make it informative with green as the accent color.
AI
Claude AI Model
#
7,000 Tokens Used
100%
AI-Generated Code Origin