Statistics • Core Flagship Pillar

Permutation & Combination Calculator

Calculate combinations (nCr = n! / [r!(n-r)!]) and permutations (nPr = n! / (n-r)!) with or without repetitions, arbitrary precision BigInt factorials, and interactive Pascal's triangle visualizers.

|
Last Updated: September 2026
|
Combinatorial BigInt Exact Precision Verified
Quick-Select Combinatorics Presets Standard Benchmarks

Combinatorics Settings

Order Sensitivity Comparison
Combinations (nCr)
2,598,960
Permutations (nPr)
311,875,200
Combinatorics Pascal's Triangle & Symmetry Model
Combinations (52 C 5)
2,598,960
Total distinct subsets
Factorial Multiplier (r!)
5! = 120
nPr / nCr = r! permutations per subset
nCr

Step-by-Step Combinatorics Derivation & Factorial Cancellation

Direct Answer & Overview
Verified Educational Guide

How to Calculate Permutations and Combinations

To find combinations nCr (order does NOT matter), calculate n! / [r!(n − r)!]. To find permutations nPr (order DOES matter), calculate n! / (n − r)!. The relationship is nPr = nCr × r!.

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
(nr)=n!r!(n−r)!(Combinations),P(n,r)=n!(n−r)!(Permutations)\binom{n}{r} = \frac{n!}{r!(n - r)!} \quad (\text{Combinations}), \quad P(n, r) = \frac{n!}{(n - r)!} \quad (\text{Permutations})
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Total number of items in set n
2
Number of chosen items r, and calculation mode (nCr vs nPr)
Expected Outputs
Calculated
Total number of distinct subsets (nCr) or arrangements (nPr)
Factorial cancellation proof and interactive Pascal's Triangle model
Worked Numerical Example
Instant Verification
5-card hand drawn from standard 52-card deck (52 C 5)
→ 52! / (5! × 47!) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 2,598,960
52 C 5 = 2,598,960 distinct poker hands

Permutations vs. Combinations: When Does Order Matter?

In combinatorics, the crucial question before solving any counting problem is whether the arrangement sequence changes the outcome:

Combinations (nCr)
ORDER DOES NOT MATTER

Choosing a group: {A, B, C} is identical to {C, B, A}. Examples: card hands, lottery tickets, pizza toppings, committees.

Permutations (nPr)
ORDER DOES MATTER

Sequencing items: (A, B, C) is different from (C, B, A). Examples: race podiums, ATM PIN passwords, batting orders, seating arrangements.

The Mathematical Formulas & Factorial Mechanics

Type Formula Example (n=5, r=3)
Permutations (No Repetition)n! / (n − r)!5! / 2! = 60
Combinations (No Repetition)n! / [r! (n − r)!]5! / (3! × 2!) = 10
Permutations (With Repetition)nʳ5³ = 125
Combinations (With Repetition)(n + r − 1)! / [r! (n − 1)!]7! / (3! × 4!) = 35

Real-World Applications of Combinatorics

Lottery & Gaming Probability

Casino card games (Blackjack, Poker) and state lotteries use combinations ($nCr$) to calculate exact house odds and expected return values.

Cybersecurity & Passwords

Password entropy calculations use permutations with repetition ($94^12 \approx 4.7 \times 10^23$) to determine resistance against brute-force attacks.

Genetics & DNA Codons

Molecular biology uses 4 nucleotide bases (A, T, C, G) in triplets ($4^3 = 64$ codons) to encode all 20 essential amino acids.

Step-by-Step Worked Numerical Solutions

Example 1: Committee Selection Combinations (nCr)

Problem: In how many ways can a 4-person committee be chosen from a department of 10 people?

1. Order does not matter, so use nCr: 10 C 4.
2. 10 C 4 = 10! / (4! × (10 − 4)!) = 10! / (4! × 6!).
3. Cancel 6!: (10 × 9 × 8 × 7) / (4 × 3 × 2 × 1).
4. 5040 / 24 = 210.
Result: 10 C 4 = 210 possible committees

Common Pitfalls & Mistakes

Using nPr for Committees

Unless committee members have specific distinct titles (President, VP, Secretary), you must use combinations ($nCr$).

Assuming 0! = 0

0! is defined as 1; setting 0! = 0 results in catastrophic division by zero errors.

Allowing r > n without Repetition

Without repetition, you cannot choose more items than exist in the set (e.g. 5 C 7 = 0).

Fact-Checked & Verified • Computational Accuracy Standards
Updated August 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is the main difference between a permutation and a combination?
In permutations (nPr), the ORDER of arrangement matters (e.g. race podium 1st, 2nd, 3rd or lock combination 1-2-3). In combinations (nCr), the order does NOT matter, only the selected subset of elements (e.g. a 5-card poker hand or a 3-person committee).
What are the formulas for nPr and nCr?
Permutations without repetition: nPr = n! / (n − r)!. Combinations without repetition: nCr = n! / [r! (n − r)!] = nPr / r!. The r! in the denominator divides out all redundant orderings of the chosen r items.
How are combinations connected to Pascal’s Triangle and the Binomial Theorem?
Each entry in row n and column r of Pascal’s Triangle equals the combination coefficient nCr = (n choose r). These exact numbers form the expansion coefficients in the Binomial Theorem: (a + b)ⁿ = ∑ [nCr · aⁿ⁻ʳ bʳ].
How do you calculate combinations with repetition (Stars and Bars)?
When items can be chosen multiple times from n distinct types, the number of combinations is given by the Stars and Bars theorem: (n + r − 1) choose r = (n + r − 1)! / [r! (n − 1)!].
Why is 0! equal to 1 in combinatorics?
0! = 1 ensures mathematical consistency across combinatorics formulas like nPn = n! / (n − n)! = n! / 0! = n!, and represents the single empty set arrangement.
How are combinations used to calculate lottery odds?
In a 6/49 lottery, where 6 numbers are drawn from 49 without replacement and order does not matter, the total possible tickets equals 49 C 6 = 49! / (6! × 43!) = 13,983,816. The probability of matching all 6 numbers with a single ticket is exactly 1 in 13,983,816.