{
    "name": "Greatest Common Factor Calculator",
    "url": "https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator.md",
    "category": "Mathematics",
    "description": "Find the greatest common factor (GCD, HCF) of two or more whole numbers, with every step of Euclid’s algorithm written out.",
    "summary": "The greatest common factor is the largest whole number that divides every number in the list. Euclid’s algorithm finds it by repeated division with remainder.",
    "also_called": [
        "GCD calculator",
        "HCF calculator",
        "Greatest common divisor calculator",
        "Highest common factor calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "numbers",
            "label": "Whole numbers",
            "type": "textarea",
            "default": "48, 180"
        }
    ],
    "outputs": [
        {
            "key": "gcf",
            "label": "Greatest common factor",
            "format": "integer"
        },
        {
            "key": "factors",
            "label": "GCF as prime factors",
            "format": "text"
        },
        {
            "key": "coprime",
            "label": "Coprime?",
            "format": "text"
        }
    ],
    "formula": {
        "text": "gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0;  gcd(a, b, c) = gcd(gcd(a, b), c)",
        "variables": {
            "a mod b": "the remainder when a is divided by b"
        }
    },
    "worked_example": {
        "inputs": {
            "numbers": "48, 180"
        },
        "steps": [
            "180 = 3 × 48 + 36.",
            "48 = 1 × 36 + 12.",
            "36 = 3 × 12 + 0, so the last non-zero remainder, 12, is the GCF."
        ],
        "result": "The greatest common factor of 48 and 180 is 12."
    },
    "interpretation": "Divide the numerator and denominator of a fraction by their GCF to reduce it in one step: 48/180 = 4/15. A GCF of 1 means the numbers are coprime.",
    "assumptions": [
        "Whole numbers between −10¹⁵ and 10¹⁵; signs are ignored."
    ],
    "limitations": [],
    "rules": null,
    "faqs": [
        {
            "question": "Are GCF, GCD and HCF the same?",
            "answer": "Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number."
        },
        {
            "question": "What is the GCF of 0 and a number?",
            "answer": "Every number divides 0, so gcd(0, n) = |n|."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Least Common Multiple Calculator",
            "url": "https://calculators.geekmidst.com/calculators/least-common-multiple-calculator"
        },
        {
            "name": "Common Factor Calculator",
            "url": "https://calculators.geekmidst.com/calculators/common-factor-calculator"
        },
        {
            "name": "Fraction Calculator",
            "url": "https://calculators.geekmidst.com/calculators/fraction-calculator"
        },
        {
            "name": "Ratio Calculator",
            "url": "https://calculators.geekmidst.com/calculators/ratio-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}