Permutation and Combination Calculator
Calculate permutations ₙPᵣ (ordered) and combinations ₙCᵣ (unordered), with and without repetition, using high-precision BigInt arithmetic.
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.
• 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
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
| Type | Repetition Allowed? | Formula |
|---|---|---|
| Permutation | No | ₙPᵣ = n! / (n - r)! |
| Permutation | Yes | nʳ |
| Combination | No | ₙCᵣ = n! / [r! · (n - r)!] |
| Combination | Yes | (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:
Example 2: 100m Sprint Podium (Top 3 of 8 runners)
Gold, Silver, and Bronze medals depend strictly on finish order, making this a permutation:
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.
Understanding Permutation and Combination Calculator & Formula
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 Enter the total set size (n) representing the number of available items.
- 2 Enter the subset size (r) representing the number of items to select.
- 3 Optionally select a Quick Sample Preset (such as Poker hand or 4-digit PIN) for immediate evaluation.
- 4 Click "Calculate" to generate the exact Permutations (ₙPᵣ) and Combinations (ₙCᵣ) along with formula substitutions.
- 5 Inspect the extended models for permutations and combinations with repetition allowed.
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.
More in Exponents and logarithms calculators 🇪
Random Number Generator
Generate true random integers or decimals within any range, with options for multiple numbers, sorting, and duplicate filters.
Exponent Calculator
Calculate exponential power expressions (x^y), negative exponents, and scientific power bases.
Log Calculator
AlgebraCalculate natural logarithm ln(x), common log₁₀(x), binary log₂(x), or arbitrary base log_b(x) with bidirectional three-way solving and step-by-step proofs.
Statistics Calculator
StatisticsCalculate descriptive statistics: Sample & Population Standard Deviation, Variance, Mean, Geometric Mean, Median, Quartiles, and Step-by-Step Deviation Tables.
Basic Calculator
EssentialFree online 4-function basic calculator with PEMDAS chain operations, memory registers (M+, M-, MR), scientific EXP notation, and keyboard support.
Antilog Calculator – Antilogarithm
Exponents & LogsCalculate inverse logarithm antilog_b(x) = b^x for base 10, e, or custom base.
Explore All 4,700+ Calculators by Category
Genetics, molecular laboratory science, veterinary dosages, animal gestation, agronomy, and forestry.
Stoichiometry, chemical solutions, thermodynamics, kinetics, electrochemistry, and organic reactions.
Concrete, roofing, brick, framing, lumber spans, driveway paving, gravel, and material specifications.
Precision metric and imperial unit converters for length, area, volume, mass, pressure, temperature, and speed.
Carbon footprint, solar energy payback, tree sequestration, recycling offsets, and sustainable living metrics.
Travel durations, clothing and shoe sizes, fuel economy, home budgeting, sleep cycles, and daily routines.
Mortgage amortization, compound interest, loans, retirement planning, taxes, investments, and salary projections.
Culinary volume-to-weight conversions, baking hydration, ingredient scaling, pizza dough, and party food planning.
BMI, daily caloric needs (TDEE/BMR), body fat percentage, pregnancy due dates, clinical dosage, and pediatric metrics.
Scientific calculators, fractions, percentages, geometry, trigonometry, algebra, linear systems, and matrices.
Kinematics, Newtonian dynamics, thermodynamics, fluid mechanics, electromagnetism, optics, and relativity.
Heart rate training zones, running pace, triathlon pacing, cycling power, calories burned, and 1RM lifting benchmarks.
Standard deviation, normal distribution (Z-scores), confidence intervals, sample size, and probability odds.
Education GPA, photography exposures, music BPM, data storage, network bandwidth, and specialty calculations.