Universal Calculator
TAIIR

Permutation & Combination Calculator

Calculate permutations (nPr), combinations (nCr), and factorials with step‑by‑step solutions. Supports repetition modes.

Formulas

Permutation:
P(n,r) = n! / (n−r)!
With repetition: n^r

Combination:
C(n,r) = n! / (r!·(n−r)!)
With repetition: C(n+r−1, r)

Factorial:
n! = n·(n−1)·...·2·1, 0! = 1

Recent

No calculations yet

Mastering Permutations and Combinations: Complete Guide

Permutations and combinations are the cornerstones of combinatorics, the branch of mathematics that studies counting. This Professional Permutation & Combination Calculator instantly computes nPr, nCr, and factorials, with optional repetition. It provides detailed step‑by‑step breakdowns, making it ideal for students, teachers, and anyone working with probability, statistics, or discrete mathematics.

Permutations (Order Matters)

A permutation counts the number of ways to arrange r items chosen from a set of n distinct items. The formula is P(n,r) = n! / (n−r)!. For example, the number of ways to arrange 3 books from a shelf of 10 is P(10,3) = 720. If repetition is allowed (e.g., a PIN code), the formula becomes n^r.

💡 Example: P(10,3) without repetition

10! / 7! = 10 × 9 × 8 = 720. With repetition: 10³ = 1000.

Combinations (Order Does Not Matter)

A combination counts the number of ways to select r items from a set of n without regard to order. The formula is C(n,r) = n! / (r!·(n−r)!). This is the binomial coefficient, often read as "n choose r". For example, the number of 5‑card hands from a 52‑card deck is C(52,5) = 2,598,960. With repetition allowed, the formula becomes C(n+r−1, r).

Factorials and Their Growth

The factorial function, denoted n!, is the product of all positive integers up to n. It grows extremely fast—10! is over 3.6 million, and 20! is about 2.4×10¹⁸. This calculator handles factorials up to 170! (≈7.26×10³⁰⁶), beyond which JavaScript's double‑precision limit is reached.

Real‑World Applications

Combinatorics is essential in probability (lottery odds, poker hands), cryptography (key space sizes), genetics (allele combinations), and computer science (algorithm complexity). Understanding permutations and combinations empowers better decision‑making in fields ranging from business to gaming.

Frequently Asked Questions

What is Pascal's Triangle?

A triangular array where each number is the sum of the two above. Row n contains C(n, r) for r=0..n. It visualizes binomial coefficients.

How are combinations used in probability?

Probability of a specific 5‑card hand = 1 / C(52,5). Combinations count favorable outcomes in many probability distributions.

Why does the calculator limit n to 170?

Due to JavaScript's double‑precision floating‑point limit (~1.8×10³⁰⁸). 170! is the largest factorial that fits.

Can I use decimal values for n or r?

No, permutations and combinations are defined for non‑negative integers. The calculator will alert you if you enter invalid values.