Permutations & Combinations Calculator

Enter whole numbers for n and r (with r ≤ n) above to see the permutations and combinations.

Calculated locally in your browser. Your input stays only on this page.

How many ways can you arrange or choose r of n?

Enter two whole numbers — n, the total number of items, and r, how many you pick — and the panel reports nPr, the number of ordered arrangements (n! / (n − r)!), and nCr, the number of unordered selections (n! / (r! · (n − r)!)), along with the supporting factorials n!, r!, and (n − r)! so the result is transparent. Each value has its own copy button, and everything updates live as you type.

The math uses BigInt, so results stay exact even when the factorials grow huge. The edge cases r = 0, r = n, and n = 0 are accepted (all yield 1 where defined). A neutral empty state and inline messages naming the offending field keep it from ever rendering NaN or Infinity: non-integers, negatives, and empty fields are rejected, r greater than n is flagged, and n is capped at 1000 so factorial growth stays responsive. Everything is computed in your browser with no network calls. Probabilities and odds, listing the actual permutations or combinations, multiset/repetition variants, and Pascal’s triangle are out of scope.