{
    "name": "Prime Factorization Calculator",
    "url": "https://calculators.geekmidst.com/calculators/prime-factorization-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/prime-factorization-calculator.md",
    "category": "Mathematics",
    "description": "Break any whole number up to 10¹⁵ into its prime factors with exponents, test whether it is prime, and count its divisors.",
    "summary": "Every whole number above 1 is a product of primes in exactly one way, ignoring order. This calculator finds those primes by trial division.",
    "also_called": [
        "Prime factor calculator",
        "Prime number checker"
    ],
    "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": "n",
            "label": "Whole number",
            "type": "number",
            "default": "360"
        }
    ],
    "outputs": [
        {
            "key": "factorization",
            "label": "Prime factorisation",
            "format": "text"
        },
        {
            "key": "caret",
            "label": "Written with ^",
            "format": "text"
        },
        {
            "key": "is_prime",
            "label": "Prime?",
            "format": "text"
        },
        {
            "key": "distinct",
            "label": "Distinct prime factors",
            "format": "integer"
        },
        {
            "key": "total",
            "label": "Prime factors counted with repeats",
            "format": "integer"
        },
        {
            "key": "divisors",
            "label": "Number of divisors",
            "format": "integer"
        }
    ],
    "formula": {
        "text": "Divide by 2, 3 and then 6k ± 1 up to √n while each divides evenly; whatever remains above 1 is prime",
        "variables": {
            "n": "the number to factor"
        }
    },
    "worked_example": {
        "inputs": {
            "n": "360"
        },
        "steps": [
            "360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45: three 2s.",
            "45 ÷ 3 = 15, ÷ 3 = 5: two 3s.",
            "5 is prime, so 360 = 2³ × 3² × 5, with (3 + 1)(2 + 1)(1 + 1) = 24 divisors."
        ],
        "result": "360 = 2³ × 3² × 5."
    },
    "interpretation": "The factorisation gives the GCF (shared primes at their lowest powers), the LCM (all primes at their highest powers) and the number of divisors.",
    "assumptions": [
        "Whole numbers from 2 to 10¹⁵, which the browser handles exactly."
    ],
    "limitations": [
        "Larger numbers need specialised algorithms; trial division up to 10¹⁵ can take a moment for a large prime."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why is the factorisation unique?",
            "answer": "This is the fundamental theorem of arithmetic: apart from the order of the factors, there is only one way to write a number as a product of primes."
        },
        {
            "question": "How do I use it to simplify a square root?",
            "answer": "Pair up equal primes: 360 = 2² × 3² × 10, so √360 = 2 × 3 × √10 = 6√10."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Factor Calculator",
            "url": "https://calculators.geekmidst.com/calculators/factor-calculator"
        },
        {
            "name": "Least Common Multiple Calculator",
            "url": "https://calculators.geekmidst.com/calculators/least-common-multiple-calculator"
        },
        {
            "name": "Greatest Common Factor Calculator",
            "url": "https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator"
        },
        {
            "name": "Root Calculator",
            "url": "https://calculators.geekmidst.com/calculators/root-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}