CalculatorScale — 4,500+ Free Online Calculators and Converters
calculators calculatorscale.com • Free

Permutation and Combination Calculator

Discrete Mathematics & Combinatorics Arbitrary-Precision BigInt Engine

Permutation and Combination Calculator

Find the total number of permutations (ordered arrangements) and combinations (unordered selections) of r objects chosen from a set of n elements, with and without repetition.

Modify the values and click the Calculate button to use

• n (Total Set): Total number of distinct items available to pick from.

• r (Sub-Set): Number of items being selected in each sample.

• Permutation (ₙPᵣ): Order matters (e.g., race rankings 1st, 2nd, 3rd).

• Combination (ₙCᵣ): Order does NOT matter (e.g., poker hand of 5 cards).

Input Parameters

Quick Sample Presets:
Non-negative integer (n ≥ r)
Number of chosen items (r ≤ n)

Awaiting Calculation

Enter total set size (n) and subset size (r) on the left and click "Calculate" to view permutations, combinations, and algebraic formulas.

Comprehensive Guide to Permutations and Combinations

Combinatorial counting principles, order significance, repetitions, and real-world probability modeling.

1Combinatorics Overview: Permutations vs. Combinations

In mathematics, combinatorics is the branch of discrete mathematics studying the enumeration, arrangement, and combination of sets of elements. The foundational question in any selection problem is: does the sequence order of chosen elements matter?

Permutations (Order Matters)

Every unique sequence or ranking is considered distinct. For example, in a race with runners A, B, and C, finishing (A, B, C) is different from (C, B, A).

Combinations (Order Does NOT Matter)

Only the collection of elements matters, regardless of arrangement. Choosing a committee of {Alice, Bob} is identical to {Bob, Alice}.

2Why "Combination Locks" are Technically Permutation Locks

In everyday language, we refer to mechanical padlock codes as "combinations". However, mathematically, if your lock code is 12-34-56, dialing 34-12-56 or 56-34-12 will NOT open the lock. Because the precise order of digits is mandatory, padlocks and digital PINs are strictly Permutation Locks with Repetition (10⁴ = 10,000 distinct possibilities for a 4-digit code).

3Complete Summary of Combinatorial Formulas

TypeRepetition Allowed?Formula
PermutationNoₙPᵣ = n! / (n - r)!
PermutationYesnʳ
CombinationNoₙCᵣ = n! / [r! · (n - r)!]
CombinationYes(n + r - 1)! / [r! · (n - 1)!]

4Real-World Worked Examples

Example 1: Poker Hand (5 cards from 52)

Because the order you hold the 5 cards does not alter your hand, this is a combination without repetition:

₅₂C₅ = 52! / (5! · 47!) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 2,598,960 possible hands.

Example 2: 100m Sprint Podium (Top 3 of 8 runners)

Gold, Silver, and Bronze medals depend strictly on finish order, making this a permutation:

₈P₃ = 8! / (8 - 3)! = 8! / 5! = 8 × 7 × 6 = 336 possible podium finishes.

Frequently Asked Questions

What is the special value of 0! (zero factorial)?

By mathematical convention and combinatorial definition, 0! = 1. There is exactly 1 way to arrange an empty set of zero items.

Why is nCr always smaller than or equal to nPr?

Every combination of r items can be arranged in r! different permutations (nPr = nCr × r!). Since r! ≥ 1 for all non-negative integers, dividing by r! always results in a number less than or equal to nPr.

Can r be greater than n in combinations with repetition?

Yes. In combinations with repetition (like choosing 10 scoops of ice cream from 4 available flavours), r can exceed n because items can be picked multiple times.

How does BigInt prevent calculation overflows for large factorials?

Standard JavaScript numbers use 64-bit floating point which loses integer precision beyond 9,007,199,254,740,991 (around 16!). BigInt supports arbitrarily large integers with exact bit-level precision, allowing exact combinatorial calculation for massive sets.

⚡ 100% Free Tool • Instant Calculation • No Sign-Up
Embed Widget

Understanding Permutation and Combination Calculator & Formula

Mathematical Formula: Permutations: ₙPᵣ = n! / (n - r)! | Combinations: ₙCᵣ = n! / [r!(n - r)!] | Repetition: nʳ, (n + r - 1)! / [r!(n - 1)!]

The Permutation and Combination Calculator on CalculatorScale.com is engineered to deliver instant, mathematically verified calculations conforming strictly to standard institutional equations. Whether planning long-term investments, managing household budgets, tracking clinical fitness targets, analyzing academic genetics, calculating veterinary dosages, or converting dimensional units, every calculation updates dynamically in real time without lag.

Every formula used in this tool adheres to certified international standards, including World Health Organization biometric metrics, veterinary clinical guidelines, NIST physical conversion constants, and standard biological equations. Results are computed entirely client-side inside your browser with complete data privacy, ensuring your sensitive numbers and statistics never leave your device.

Our calculators are 100% free with no registration, subscriptions, or paywalls required. You can toggle between imperial and metric units, customize input parameters, export calculation summaries, or embed this calculator directly into your own website or blog.

How to Use the Permutation and Combination Calculator

  1. 1 Enter the total set size (n) representing the number of available items.
  2. 2 Enter the subset size (r) representing the number of items to select.
  3. 3 Optionally select a Quick Sample Preset (such as Poker hand or 4-digit PIN) for immediate evaluation.
  4. 4 Click "Calculate" to generate the exact Permutations (ₙPᵣ) and Combinations (ₙCᵣ) along with formula substitutions.
  5. 5 Inspect the extended models for permutations and combinations with repetition allowed.
FAQ & Help 3 questions

Permutation and Combination Calculator — Frequently Asked Questions

Q1 What is the key difference between permutations and combinations? ▾

Order matters in permutations (e.g., race podium finishes 1st, 2nd, 3rd where (A, B, C) ≠ (C, B, A)). Order does NOT matter in combinations (e.g., a hand of playing cards where {A, K, Q} = {Q, A, K}).

Q2 Why are combination locks actually permutation locks? ▾

Because the precise sequence in which you enter or dial the digits is mandatory to open the lock (code 1-2-3 will not open if dialed 3-2-1), padlocks and digital PINs are mathematically permutation locks with repetition.

Q3 Why does 0! equal 1 in combinatorial formulas? ▾

By mathematical convention and set theory, there is exactly one way to arrange an empty set of zero items. Defining 0! = 1 ensures formulas like ₙPₙ = n!/(n-n)! = n!/0! = n! remain algebraically consistent.

Math • Exponents and logarithms calculators 🇪

More in Exponents and logarithms calculators 🇪

Browse Math →
Categories

Explore All 4,700+ Calculators by Category

Master A-Z Directory →
Biology Calculators 124

Genetics, molecular laboratory science, veterinary dosages, animal gestation, agronomy, and forestry.

Chemistry Calculators 111

Stoichiometry, chemical solutions, thermodynamics, kinetics, electrochemistry, and organic reactions.

Construction Calculators 7

Concrete, roofing, brick, framing, lumber spans, driveway paving, gravel, and material specifications.

Conversion Calculators 17

Precision metric and imperial unit converters for length, area, volume, mass, pressure, temperature, and speed.

Ecology Calculators 6

Carbon footprint, solar energy payback, tree sequestration, recycling offsets, and sustainable living metrics.

Everyday Life Calculators 13

Travel durations, clothing and shoe sizes, fuel economy, home budgeting, sleep cycles, and daily routines.

Finance Calculators 77

Mortgage amortization, compound interest, loans, retirement planning, taxes, investments, and salary projections.

Food & Cooking Calculators 1

Culinary volume-to-weight conversions, baking hydration, ingredient scaling, pizza dough, and party food planning.

Health Calculators 29

BMI, daily caloric needs (TDEE/BMR), body fat percentage, pregnancy due dates, clinical dosage, and pediatric metrics.

Math Calculators 432

Scientific calculators, fractions, percentages, geometry, trigonometry, algebra, linear systems, and matrices.

Physics Calculators 490

Kinematics, Newtonian dynamics, thermodynamics, fluid mechanics, electromagnetism, optics, and relativity.

Sports & Athletic Calculators 4

Heart rate training zones, running pace, triathlon pacing, cycling power, calories burned, and 1RM lifting benchmarks.

Statistics Calculators 7

Standard deviation, normal distribution (Z-scores), confidence intervals, sample size, and probability odds.

Other Calculators 17

Education GPA, photography exposures, music BPM, data storage, network bandwidth, and specialty calculations.