{
  "slug": "permutation-combination",
  "title": "Permutation and Combination Calculator",
  "heading": "Permutation and Combination Calculator",
  "category": "math",
  "url": "https://www.revenuelab.fyi/toolbox/permutation-combination",
  "summary": "nPr, nCr, and factorials for counting problems.",
  "description": "Permutations count arrangements where order matters; combinations count selections where it does not. Lottery odds, team picks, and password strength all reduce to one of these two.",
  "formula": "nPr = n! ÷ (n−r)!. nCr = n! ÷ (r!(n−r)!).",
  "dateModified": "2026-09-30",
  "run_url": "https://www.revenuelab.fyi/api/public/calc?tool=permutation-combination",
  "inputs": [
    {
      "id": "n",
      "label": "n (total items)",
      "kind": "number",
      "hint": null,
      "default": 52,
      "unit": null,
      "min": 0,
      "max": 170
    },
    {
      "id": "r",
      "label": "r (chosen)",
      "kind": "number",
      "hint": null,
      "default": 5,
      "unit": null,
      "min": 0,
      "max": null
    }
  ],
  "outputs": [
    {
      "id": "nCr",
      "label": "Combinations (nCr)",
      "format": "number",
      "hint": null,
      "primary": true
    },
    {
      "id": "nPr",
      "label": "Permutations (nPr)",
      "format": "number",
      "hint": null,
      "primary": false
    },
    {
      "id": "withRepetition",
      "label": "Arrangements with repetition (nʳ)",
      "format": "number",
      "hint": null,
      "primary": false
    },
    {
      "id": "factorialN",
      "label": "n factorial",
      "format": "number",
      "hint": null,
      "primary": false
    },
    {
      "id": "odds",
      "label": "Odds of one specific combination",
      "format": "decimal",
      "hint": null,
      "primary": false
    }
  ],
  "worked_example": {
    "inputs": [
      "n (total items): 52",
      "r (chosen): 5"
    ],
    "outputs": [
      "Combinations (nCr): 2,598,960",
      "Permutations (nPr): 311,875,200",
      "Arrangements with repetition (nʳ): 380,204,032",
      "n factorial: 80,658,175,170,943,880,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000",
      "Odds of one specific combination: 0.0000003848"
    ]
  },
  "how_to": {
    "title": "How to use this",
    "steps": [
      "Enter n (total items).",
      "Enter r (chosen).",
      "Read your combinations (ncr) on the right — it updates as you type.",
      "Hit Share to keep the scenario or send it to someone."
    ]
  },
  "scenarios": [
    {
      "name": "Conservative",
      "description": "Lower-end numbers — what if things land soft?",
      "values": {
        "n": 31,
        "r": 3
      }
    },
    {
      "name": "Typical",
      "description": "Defaults — the most common real-world setup.",
      "values": {
        "n": 52,
        "r": 5
      }
    },
    {
      "name": "Ambitious",
      "description": "Higher-end numbers — what if things really pop?",
      "values": {
        "n": 83,
        "r": 8
      }
    }
  ],
  "limitations": [
    "Results are rounded for display; the underlying calculation keeps full precision.",
    "Very large or very small inputs may hit floating-point limits in the browser.",
    "Inputs outside the accepted range are clamped rather than rejected."
  ],
  "faq": [
    {
      "q": "How does the permutation and combination calculator work?",
      "a": "Permutations count arrangements where order matters; combinations count selections where it does not. Lottery odds, team picks, and password strength all reduce to one of these two. The underlying maths is: nPr = n! ÷ (n−r)!. nCr = n! ÷ (r!(n−r)!)."
    },
    {
      "q": "What do I need to enter?",
      "a": "2 values: n (total items), and r (chosen). Each field starts with a sensible default, so you can change one number at a time and watch the result move."
    },
    {
      "q": "What does the combinations (ncr) result mean?",
      "a": "It is returned as a whole number and updates live as you edit the inputs, so you can compare two or three versions of a scenario in a few seconds."
    },
    {
      "q": "Is this calculator free, and do I need an account?",
      "a": "Yes, it's free, and no account is required. Nothing you type is stored on our servers — the maths runs entirely in your browser."
    },
    {
      "q": "How accurate is the result?",
      "a": "It applies the standard formula exactly, so the arithmetic is precise. Results are rounded for display; the underlying calculation keeps full precision."
    },
    {
      "q": "Who is this tool for?",
      "a": "It's built for students, developers, and anyone who needs the answer right now without setting up a spreadsheet."
    }
  ],
  "related": [
    "https://www.revenuelab.fyi/toolbox/probability",
    "https://www.revenuelab.fyi/toolbox/z-score"
  ],
  "license": "CC-BY-4.0",
  "citation": "RevenueLab — Permutation and Combination Calculator (https://www.revenuelab.fyi/toolbox/permutation-combination)"
}