🎯
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

Permutation & Combination Calculator

nPr and nCr

Last reviewed: April 2026

🧮
500 calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

What Is a Permutation and Combination Calculator?

A permutation and combination calculator computes both arrangements (order matters) and selections (order does not matter) from a single interface. It helps students and professionals quickly distinguish between and solve these two fundamental counting problems.

Permutations and Combinations Compared

The fundamental question in counting problems is: does order matter? If rearranging the same items creates a different outcome, use permutations (P). If not, use combinations (C). The relationship is P(n,r) = C(n,r) × r!, because each combination can be arranged in r! ways.[1] For any given n and r, permutations always produce a larger number than combinations because they count every possible ordering. Choosing 3 people from 10 for a committee gives C(10,3) = 120, while assigning them to president, VP, and secretary gives P(10,3) = 720 — six times more because each group of 3 has 3! = 6 possible role assignments.[2] Lottery odds use combinations (order of numbers drawn does not matter), while horse racing exactas use permutations (the finishing order matters).[3] Use the Probability Calculator for probability computations using these counting methods.

Real-World Applications

Lottery odds use combinations — C(49,6) = 13,983,816 possible 6-number selections from 49 numbers (1 in ~14 million chance). Password security uses permutations — an 8-character password from 62 possible characters (a–z, A–Z, 0–9) has 62⁸ ≈ 218 trillion arrangements (with repetition allowed). Sports brackets, tournament seedings, DNA codon arrangements, and cryptography all rely on combinatorial math. Permutations with repetition (like license plates where letters can repeat) use nʳ, while permutations without repetition use n!/(n−r)!. Calculate the probability of specific outcomes with our Probability Calculator.

When to Use Permutations vs Combinations

ScenarioOrder Matters?FormulaAnswer (n=10, r=3)
Picking a team of 3NoC(10,3)120
Ranking top 3YesP(10,3)720
3-digit code (no repeat)YesP(10,3)720
3-digit code (repeat OK)Yes10³1,000

Permutations vs. Combinations: The Order Question

The fundamental distinction in combinatorics is whether order matters. A permutation counts the number of ways to arrange items where the sequence is significant — a password "ABC" is different from "CBA." A combination counts selections where sequence is irrelevant — a committee of Alice, Bob, and Charlie is the same committee regardless of the order they are listed. This single distinction determines which formula to apply and can change answers by orders of magnitude. For choosing 3 items from 10: the number of permutations is P(10,3) = 720, while the number of combinations is C(10,3) = 120 — exactly 6 times fewer (because 3! = 6 represents the number of ways to rearrange 3 items).

The permutation formula P(n,r) = n! / (n-r)! counts ordered arrangements of r items chosen from n distinct items. The combination formula C(n,r) = n! / (r!(n-r)!) is the permutation formula divided by r!, which removes the duplicate arrangements that differ only in order. The relationship P(n,r) = C(n,r) × r! makes this connection explicit — every combination of r items can be arranged in r! different orders, and each arrangement is a distinct permutation. Understanding this relationship helps you verify which formula applies: if rearranging your selection creates a meaningfully different outcome (codes, rankings, sequences), use permutations; if rearranging creates the same outcome (teams, groups, hands), use combinations.

Real-World Applications of Permutations

Permutations apply whenever order matters. Phone numbers, PIN codes, and passwords are permutations because the sequence of digits or characters determines the code — 1234 is different from 4321. A 4-digit PIN using digits 0-9 (with repetition allowed) has 10⁴ = 10,000 permutations, which is why financial institutions consider 4-digit PINs minimally secure. An 8-character alphanumeric password using lowercase letters and digits (36 characters) has 36⁸ ≈ 2.82 trillion permutations, making brute-force attacks impractical.

In horse racing, trifecta bets require predicting the top three finishers in exact order. In a 12-horse race, there are P(12,3) = 1,320 possible trifecta outcomes, explaining why trifecta payouts are typically much larger than win bets. Tournament seedings, batting orders in baseball, and priority rankings are all permutation problems. DNA sequencing involves permutations of four nucleotide bases — the number of possible sequences of length n is 4ⁿ, which for a typical human gene of 1,000 base pairs yields 4¹⁰⁰⁰ possible sequences, a number vastly larger than the number of atoms in the observable universe.

Real-World Applications of Combinations

Combinations apply whenever order does not matter. Lottery drawings are the quintessential combination problem — the numbers 3, 17, 24, 35, 42 form the same winning combination regardless of the order drawn. For a 6/49 lottery, C(49,6) = 13,983,816 possible tickets. Card games use combinations extensively — the number of possible 5-card poker hands from a 52-card deck is C(52,5) = 2,598,960. Team selection, jury composition, committee formation, and sampling for quality control are all combination problems.

In genetics, the number of possible offspring genotypes from two parents with n independently assorting gene loci is related to combinations. In investing, choosing 10 stocks from a universe of 500 to create a portfolio involves C(500,10) ≈ 2.63 × 10²⁰ possible portfolios. Software testing uses combinatorial testing to verify behavior across multiple variables — testing all combinations of 4 browsers, 3 operating systems, and 5 screen resolutions requires C(4,1)×C(3,1)×C(5,1) = 60 test cases rather than testing every permutation of settings. Our Combination Calculator and Binomial Probability Calculator handle specific aspects of these calculations.

Permutations and Combinations with Special Conditions

Many real problems involve constraints that modify the basic formulas. Permutations with repetition allow items to be reused — the number of possible r-length sequences from n items is nʳ (license plates, phone numbers). Combinations with repetition use the formula C(n+r-1, r) for choosing r items from n types when repeats are allowed (choosing 5 scoops from 10 ice cream flavors). Circular permutations — arrangements around a circle where rotations are equivalent — reduce the count by a factor of n: (n-1)! instead of n! (seating arrangements at a round table).

Permutations of items with duplicates divide by the factorials of each group of identical items. The number of distinct arrangements of the letters in "MISSISSIPPI" is 11! / (4! × 4! × 2! × 1!) = 34,650, accounting for the four S's, four I's, two P's, and one M. Conditional counting — where certain positions must be filled by specific items or certain items must be adjacent — typically requires breaking the problem into cases or using complementary counting (total arrangements minus forbidden arrangements). These advanced techniques are essential in competitive mathematics, computer science algorithm design, and statistical sampling methodology.

Computational Complexity and Large-Scale Combinatorics

Combinatorial numbers grow extremely rapidly. C(100,50) ≈ 10²⁹, and P(100,50) ≈ 10⁹⁴. These astronomical numbers have practical implications for computational problems — any problem requiring enumeration of all permutations or combinations becomes computationally intractable beyond modest sizes. This is the basis of computational complexity theory and the P vs. NP problem, one of the most important open questions in mathematics and computer science. Cryptographic security relies directly on the intractability of combinatorial problems — breaking modern encryption would require testing a number of key combinations so large that all computers on Earth working together could not complete the search before the heat death of the universe. Approximation algorithms, heuristic methods, and probabilistic techniques provide practical approaches for problems where exact combinatorial solutions are infeasible. Our Sample Size Calculator uses combinatorial principles to determine how many observations are needed for statistically valid conclusions.

Combinatorics in Probability Theory

Permutations and combinations form the foundation of classical probability theory. The probability of an event equals the number of favorable outcomes divided by the total number of possible outcomes — and counting those outcomes requires combinatorial techniques. The probability of a royal flush in poker is C(4,1)/C(52,5) = 4/2,598,960 ≈ 0.000154%. The probability of matching all 6 numbers in a 6/49 lottery is 1/C(49,6) = 1/13,983,816 ≈ 0.00000715%. These calculations connect combinatorics directly to risk assessment, decision-making, and statistical inference throughout science, business, and daily life.

What is the factorial function and why is it important?
Factorial (n!) means multiplying all positive integers from 1 to n: 5! = 5 × 4 × 3 × 2 × 1 = 120. It counts the total number of ways to arrange n distinct items. Factorial growth is extremely rapid: 10! = 3,628,800 and 20! exceeds 2.4 quintillion. By convention, 0! = 1. Factorials are the building blocks of both permutation and combination formulas: P(n,r) = n!/(n−r)! and C(n,r) = n!/(r!(n−r)!). Use our Factorial Calculator for large values.
How do I know whether to use permutations or combinations?
Ask: "If I rearrange the selected items, does it count as a different outcome?" If yes → permutation. If no → combination. Choosing a president, VP, and treasurer from 10 candidates → permutation (different roles). Choosing a 3-person committee from 10 → combination (no distinct roles). A helpful mnemonic: Permutation = Position matters, Combination = Collection only.
How do I decide between permutation and combination for a problem?
Ask: if I rearrange the selected items, do I get a different result? Selecting pizza toppings — order does not matter, use combinations. Arranging books on a shelf — order matters, use permutations. Choosing lottery numbers — order does not matter, use combinations. Creating a password — order matters, use permutations.
What is the factorial in permutation and combination formulas?
Factorial (n!) is the product of all positive integers from 1 to n: 5! = 5×4×3×2×1 = 120. It counts the total ways to arrange n distinct items. In P(n,r) = n!/(n-r)!, the factorial division removes arrangements of the items we did not select. In C(n,r) = n!/(r!(n-r)!), the extra r! division removes duplicate selections that differ only in order.
Can I use permutations and combinations with non-numeric items?
Absolutely. The formulas work with any distinct items — letters, people, colors, cards, anything. P(26,5) counts 5-letter arrangements from the alphabet. C(52,5) counts 5-card poker hands. C(12,4) counts ways to choose 4 team members from 12 candidates. The items do not need to be numbers; they just need to be distinguishable from each other.

How to Use This Calculator

  1. Enter n and r values — n = total items, r = items being selected.
  2. Select permutation or combination — Permutations: order matters. Combinations: order doesn't matter.
  3. Choose with or without repetition — Standard is without repetition. With repetition allows items to be selected more than once.
  4. Review with formula — Shows the answer, formula used, and step-by-step calculation for learning and verification.

Tips and Best Practices

Run multiple scenarios. Try different inputs to see how changes affect the outcome. Small differences in rates, terms, or amounts can have a large impact over time.

Use conservative estimates. When projecting future returns or growth, err on the low side. Optimistic assumptions lead to plans that fall short.

Compare before committing. Use the results alongside other financial calculators on this site to see the full picture before making a financial decision.

Bookmark for periodic check-ins. Financial situations change — revisit this calculator quarterly or when your circumstances shift to keep your plan on track.

See also: Probability Calculator · Factorial Calculator · Binomial Probability Calculator

📚 Sources & References
  1. [1] Khan Academy. Counting, Permutations, Combinations. KhanAcademy.org
  2. [2] Wolfram MathWorld. Permutation and Combination. MathWorld
  3. [3] OpenStax. Statistics — Counting. OpenStax.org
  4. [4] NIST. Combinatorial Analysis. NIST.gov
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author