1. Converter Tools > 
  2. Calculators > 
  3. Math > 
  4. GCD and LCM Calculator

GCD and LCM Calculator

Find greatest common divisor (GCD) and least common multiple (LCM) of two integers. Example: 12, 18 → GCD 6, LCM 36. Copy result.

GCD (greatest common divisor) is the largest positive integer that divides both numbers. LCM (least common multiple) is the smallest positive integer divisible by both. Enter two integers. The calculator gives GCD and LCM. Copy the result or Copy with labels.

Loading…

Advertisement

Examples

  • 12, 18 → GCD 6, LCM 36
  • 7, 11 → GCD 1, LCM 77
  • 24, 36 → GCD 12, LCM 72

FAQ

What is GCD?

Greatest common divisor: the largest positive integer that divides both numbers. Example: GCD(12, 18) = 6.

What is LCM?

Least common multiple: the smallest positive integer divisible by both. Example: LCM(12, 18) = 36.

How are GCD and LCM related?

GCD(a, b) × LCM(a, b) = |a × b| for two integers (for positive a, b: GCD × LCM = a × b).

Can I use negative numbers?

GCD and LCM are usually defined for positive integers. The calculator may use absolute values.

What if one number is zero?

GCD(a, 0) = |a|. LCM(a, 0) is typically undefined or 0 depending on definition. The tool may handle it.

Advertisement

Related

  • Quadratic Equation Solver
  • Factorial Calculator
  • Prime Number Checker
Ad
Converter Tools

  • Home


    • Conversions
      • Length Converter
      • Area Converter
      • Volume Converter
      • Color Converter
      • Weight Converter
      • Temperature Converter
      • Angle Converter
      • Time Converter
      • Data Size Converter
      • Energy Converter
      • Number Base Converter
    • Calculators
      • Lengths
        • Feet and Inches Calculator
        • Pythagorean Theorem Calculator
        • Circle Circumference Calculator
        • Circle Area Calculator
        • Triangle Area Calculator
        • Rectangle Area and Perimeter Calculator
      • Percentages
        • What is X% of Y Calculator
        • X is What Percent of Y Calculator
        • Percentage Change Calculator
        • Add or Subtract Percentage Calculator
      • Time
        • Age Calculator
        • Date Difference Calculator
        • Day of Week Calculator
        • Countdown Calculator
        • Week Number Calculator
      • Body indices
        • BMR Calculator
        • TDEE Calculator
        • Ideal Weight Calculator
        • Body Fat Percentage Calculator
        • Waist-to-Hip Ratio Calculator
        • Calorie Deficit Calculator
        • BMI Calculator
      • Finance
        • Tip Calculator
        • Discount Calculator
        • Simple Interest Calculator
        • Compound Interest Calculator
        • Loan Payment (EMI) Calculator
      • Math
        • Quadratic Equation Solver
        • Factorial Calculator
        • GCD and LCM Calculator
        • Prime Number Checker
    • Dev Tools
      • Base64 Encode and Decode
      • Password Generator
      • QR Code Generator
      • Regex Tester
      • UUID Generator
    • Images
      • Image Conversions
      • Image Compression
      • Image Resize
      • Image Grayscale
      • EXIF Reader
      • Image Filters
      • Edge Detection
      • Image Crop
      • Image Rotate & Flip
      • Image Format Info
      • Image Thumbnail
    • File conversions
      • CSV and Excel Converter
    • PDF editing
      • Merge PDFs
      • Split PDF
      • Extract PDF pages
      • Rotate PDF pages
      • Add watermark to PDF
      • PDF metadata
    • Cheatsheets
      • CSS
        • CSS Color Cheatsheet
        • CSS Common Properties Cheatsheet
        • CSS Flexbox Cheatsheet
        • CSS Grid Cheatsheet
      • HTML
        • HTML Cheatsheet
      • Markdown
        • Markdown Cheatsheet
      • Git
        • Git Cheatsheet
      • Regex
        • Regex Cheatsheet
      • Time
        • Unix Timestamp Cheat
    • About
    • Contact
    • Privacy Policy
    • Terms of Use

        Built with by Hugo

        We use cookies and similar technologies for ads (e.g. Google AdSense) and analytics. By continuing you consent to our Privacy Policy. You can change preferences anytime.