Skip to main content
🔢 Combinatorics

Permutation & Combination Calculator

Count the ways to choose r from n — permutations (nPr, order matters) and combinations (nCr, order doesn't) — with the factorials shown.

nPr (ordered)
nCr (unordered)
Factorials
Big numbers
100% Free
🔢 Open All Math Calculators 📖 Read the Guide

Permutations & combinations — Quick answer

Permutations count ordered selections; combinations count unordered ones. nPr is r! times nCr.

nPr = n! / (n − r)!  (order matters)
nCr = n! / (r!·(n − r)!)  (order doesn't)

Worked example: n = 5, r = 2 → nPr 20, nCr 10.

nPr and nCr at a glance

n, rnPrnCr
5, 22010
10, 3720120
6, 67201
52, 5311,875,2002,598,960

Used for: passwords, lotteries, card hands, committees, race orders.

🔢 Permutation & Combination Calculator

Enter the total items n and the number chosen r (whole numbers, 0 ≤ r ≤ n).

Permutations (nPr)
Combinations (nCr)
n!
r!

⚠️ Requires whole numbers with 0 ≤ r ≤ n. nPr counts ordered selections, nCr unordered (nPr = r! × nCr). Very large factorials are shown in scientific notation.

Permutations and combinations count how many ways you can pick r things from n. The difference is order. A permutation treats different orders as different outcomes: nPr = n!/(n−r)!. A combination ignores order, counting only which items are chosen: nCr = n!/(r!(n−r)!). Since each chosen group can be arranged in r! ways, nPr is always r! times nCr. The single question to ask is simply: does rearranging the selection make it a new outcome?

Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: the standard nPr and nCr definitions.

The counting formulas

Permutation (order matters)
nPr = n! / (n − r)!
Combination (order doesn't)
nCr = n! / (r! · (n − r)!) = nPr / r!
Factorial
n! = n × (n−1) × … × 2 × 1 · 0! = 1

A factorial counts the arrangements of n distinct items. The permutation formula cancels the (n−r)! arrangements of the items you didn't pick, leaving the ordered selections of the r you did. The combination formula then divides by r! to remove the orderings within the chosen group, since for a combination those count as one. That r! factor is exactly why nPr ≥ nCr, with equality only when r ≤ 1.

Worked example — choose 2 from 5

Scenario: n = 5 items, choose r = 2.

Permutations
nPr = 5! / 3! = 120 / 6 = 20
Combinations
nCr = 5! / (2!·3!) = 120 / 12 = 10

There are 20 ordered ways and 10 unordered ways to pick 2 of 5 — and indeed 20 = 2! × 10, the r! relationship. The pattern scales: choosing 3 of 10 gives 720 permutations and 120 combinations; choosing all 6 of 6 gives 6! = 720 permutations but only 1 combination (there's just one way to take everything). And a 5-card hand from a 52-card deck is nCr(52,5) = 2,598,960 — the foundation of poker odds.

Frequently Asked Questions

Permutation vs combination?

Permutations count order, combinations don't. 5 choose 2 → 20 vs 10.

How to calculate nPr?

n!/(n−r)!. 5,2 → 120/6 = 20. Or multiply the top r terms: 5×4 = 20.

How to calculate nCr?

n!/(r!(n−r)!) = nPr/r!. 5,2 → 120/12 = 10. nCr(52,5) = 2,598,960.

What is a factorial?

n! = n×(n−1)×…×1. 5! = 120. 0! = 1. Grows very fast.

Which do I use?

Order matters → nPr (codes, race order). Only the group → nCr (lottery, hands).

Ready to perform complete calculations?

Use the full AI Calculator suite for combinatorics, probability and math with a professional PDF report.

🔢 Open Math Calculators — Free

No registration required · 350+ calculators · PDF report export