Calculators PlanetCalculators Planet
HomeFinancialMathHealthOtherBlogAboutContact
Calculators PlanetCalculators Planet

Fast, accurate, and user-friendly online calculators for all your needs.

Financial

  • Mortgage Calculator
  • Amortization Calculator
  • Mortgage Payoff Calculator
  • House Affordability Calculator
  • Rent Calculator

Math

  • Decimal to Fraction Calculator
  • Significant Figures Calculator
  • Percentage Calculator
  • Fraction Calculator
  • Ratio Calculator

Health

  • BMI Calculator
  • Ideal Weight Calculator
  • Body Fat Calculator
  • Calorie Calculator
  • Macro Calculator

Other

  • Age Calculator
  • Date Calculator
  • Time Calculator
  • Hours Calculator
  • Time Card Calculator

2026 Calculators Planet. All rights reserved.

BlogAboutContactPrivacy PolicyCookie PolicyTerms of ServiceDisclaimer
Calculators PlanetCalculators Planet
HomeFinancialMathHealthOtherBlogAboutContact
HomeMathPermutation and Combination Calculator

Permutation and Combination Calculator

Calculate permutations P(n,r) and combinations C(n,r) from any values of n and r. Exact results with factorial breakdown for all inputs up to n=200.

Share:
Enter Values

Maximum value: 200

P(n,r) = n! / (n-r)!

C(n,r) = n! / (r! × (n-r)!)

Results

Permutations P(10,3) - Order matters

720

Number of ways to arrange 3 items from 10

Combinations C(10,3) - Order does not matter

120

Number of ways to select 3 items from 10

Factorials Used

10! = 3628800

3! = 6

(10-3)! = 7! = 5040

Permutation is larger than combination because permutations count each arrangement separately, while combinations treat all arrangements of the same group as one.

Permutations and combinations are the mathematical foundation for counting possibilities, and they underpin probability theory, statistics, cryptography, genetics, and logistics. The key distinction is whether order matters. When order matters, you use permutations. When only the selection matters and order is irrelevant, you use combinations. The Powerball lottery, which draws 5 white balls from 69 and 1 red Powerball from 26, is a classic combination problem: C(69,5) x C(26,1) = 292,201,338 possible outcomes, making the jackpot odds approximately 1 in 292 million. Whether you are calculating lottery odds, assessing password security, or determining how many ways a team can be assembled, these formulas provide exact answers.

What This Calculator Does

Enter n (the total number of items available) and r (the number of items you want to select or arrange). The calculator computes both the permutation P(n,r) and combination C(n,r) simultaneously, along with the factorials used in each calculation.

For related math tools, try our Probability Calculator for calculating event probabilities, or our Factorial Calculator for computing factorials individually. You can also use our Statistics Calculator for broader data analysis.

Inputs Required

  • n: The total number of distinct items in the set
  • r: The number of items to select or arrange (r must be less than or equal to n)

Outputs Provided

  • P(n,r): Number of permutations (order matters)
  • C(n,r): Number of combinations (order does not matter)
  • Factorials: n!, r!, and (n-r)! where applicable

How the Calculation Works

Both formulas use factorials. The factorial of a number n (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.

Permutation: P(n,r) = n! / (n-r)!

Combination: C(n,r) = n! / (r! x (n-r)!)

The combination formula divides the permutation result by r! to remove duplicate arrangements of the same group. For example, choosing {A, B, C} from a set is the same combination whether you pick A first, B first, or C first. The r! factor removes all those equivalent orderings.

How to Use the Calculator

  1. Enter n, the total number of items in your set
  2. Enter r, the number of items you want to select or arrange
  3. Read P(n,r) for order-sensitive problems and C(n,r) for selection problems
  4. Review the factorials shown to understand how the result was derived

Example Calculations

Arranging Books on a Shelf

How many ways can you arrange 3 books chosen from a shelf of 10? n = 10, r = 3. P(10,3) = 10! / 7! = 10 x 9 x 8 = 720 arrangements. If you simply need to choose 3 books to take on a trip (order does not matter), C(10,3) = 10! / (3! x 7!) = 720 / 6 = 120 selections. There are 720 ordered arrangements but only 120 distinct groups because each group of 3 can be arranged in 3! = 6 different orders.

Powerball Lottery Odds

Powerball draws 5 white balls from 69 and 1 red Powerball from 26. The white ball selection is a combination (order does not matter): C(69,5) = 69! / (5! x 64!) = 11,238,513. The red Powerball is independent: C(26,1) = 26. Total combinations: 11,238,513 x 26 = 292,201,338. Your odds of winning the jackpot are 1 in 292,201,338. The overall odds of winning any prize (from $4 to the jackpot) are approximately 1 in 24.87.

Real-World Scenarios

Password Security Assessment in San Francisco

A security engineer at a fintech startup in San Francisco is evaluating PIN-based authentication for a mobile app. The system uses a 6-digit PIN from digits 0 through 9, where each digit can only be used once and order matters. This is a permutation: P(10,6) = 10! / 4! = 151,200 possible PINs. She compares this to a standard 4-digit PIN with repetition allowed: 10^4 = 10,000 possible PINs. The 6-digit no-repeat system offers 15 times more combinations. However, she notes that for true security analysis, the relevant metric is entropy, and she recommends a minimum of 6 digits with repetition allowed (10^6 = 1,000,000 combinations) for consumer-facing apps.

Lottery Odds Comparison in Miami

A statistics student in Miami is comparing lottery games for a probability class project. Powerball requires choosing 5 of 69 white balls plus 1 of 26 red balls: C(69,5) x 26 = 292,201,338 combinations, for jackpot odds of 1 in 292 million. Mega Millions requires choosing 5 of 70 white balls plus 1 of 25 gold balls: C(70,5) x 25 = 302,575,350 combinations, for jackpot odds of 1 in 302.6 million. She uses the calculator to demonstrate that Mega Millions has slightly worse jackpot odds than Powerball, though both are astronomically unlikely. Her professor uses this example to discuss expected value: even with a $1 billion jackpot, the expected value of a $2 ticket remains negative after accounting for taxes, lump sum reduction, and shared jackpot probabilities.

Team Assembly for a Project in Seattle

A project manager at a tech company in Seattle needs to form a 4-person task force from a pool of 12 engineers. The order of selection does not matter, only who is chosen. C(12,4) = 12! / (4! x 8!) = 495 possible teams. However, if the task force has distinct roles (lead, backend, frontend, QA), order matters and the calculation becomes P(12,4) = 12! / 8! = 11,880 possible assignments. The calculator shows both values, helping the manager understand why role-based assignments create far more possibilities than simple team selection.

Common Mistakes to Avoid

  • Using permutations when order does not matter: If the problem asks how many groups or committees can be formed, use combinations. Permutations overcount by treating each rearrangement as a different result. For example, C(10,3) = 120 but P(10,3) = 720, a 6x difference
  • Forgetting that 0! = 1: The factorial of zero is defined as 1, not 0. This is required for the formulas to work correctly when r = n or r = 0. Without this convention, C(n,n) would be undefined, but the correct answer is 1 (there is only one way to choose all n items from n items)
  • Allowing r to exceed n: You cannot choose more items than are available. P(n,r) and C(n,r) are zero when r is greater than n
  • Confusing with replacement: These formulas apply to sampling without replacement. If items can be repeated, different counting rules apply: permutations with repetition = n^r, and combinations with repetition = C(n+r-1, r)
  • Overlooking factorial growth: Factorials grow extremely fast. 20! is already over 2 quadrillion (2,432,902,008,176,640,000). Even modest values of n produce enormous results, which is why this calculator uses BigInt arithmetic for exact large-number calculations

Limitations of This Calculator

This calculator computes standard permutations P(n,r) and combinations C(n,r) for sampling without replacement. It does not handle permutations with repetition (n^r), combinations with repetition (C(n+r-1, r)), or partial permutations with replacement. It does not compute multinomial coefficients or Stirling numbers. The calculator uses BigInt arithmetic to handle large factorials without floating-point rounding errors, but extremely large inputs (n above 1000) may produce results too large to display meaningfully. For probability calculations that require dividing combinations by total outcomes, use the Probability Calculator for the final step. This tool provides the raw counts, not the associated probabilities.

Authoritative Research and Resources

  • Powerball Official Prize Chart and Odds - The official Powerball website with prize structures, odds for all 9 prize tiers, and the current jackpot. The overall odds of winning any prize are 1 in 24.87, with jackpot odds of 1 in 292,201,338.
  • NIST Dictionary of Algorithms and Data Structures: Permutations and Combinations - The National Institute of Standards and Technology maintains a reference dictionary defining permutations, combinations, and factorial operations with formal mathematical notation and algorithmic implementations.
  • Khan Academy: Counting, Permutations, and Combinations - A free educational resource covering the fundamental counting principle, permutations, combinations, and probability applications with worked examples and interactive exercises.

Frequently Asked Questions

How do I know when to use permutations vs combinations?
Ask yourself: does the order of selection matter? If choosing A, B, C is different from choosing C, B, A, use permutations. If they count as the same selection, use combinations. Examples where order matters: race placements, seating arrangements, passwords, PIN codes. Examples where order does not matter: committee selection, card hands, lottery numbers, team formation. When in doubt, consider whether rearranging the selected items creates a meaningfully different outcome.
What is a factorial and why is it used?
A factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. Factorials count the total number of ways to arrange n distinct items. They appear in permutation and combination formulas because counting arrangements fundamentally involves multiplying decreasing sequences of integers. Factorials grow extremely fast: 20! is already over 2 quadrillion.
Why does 0! equal 1?
There is exactly one way to arrange zero items: do nothing. This is why 0! is defined as 1. Without this convention, the combination formula C(n,n) would be undefined, but the correct answer is 1 (there is only one way to choose all n items from n items). Defining 0! = 1 makes the formulas work correctly for all valid inputs, including edge cases where r equals 0 or r equals n.
Why are permutation and combination results so large?
Factorials grow extremely fast. 20! is already over 2 quadrillion (2,432,902,008,176,640,000). This means that even with relatively small values of n and r, the results can be very large numbers. This calculator uses BigInt arithmetic to handle exact results for large inputs without floating-point rounding errors, which is critical for accurate probability calculations in cryptography, genetics, and statistical sampling.
Do these formulas work when repetition is allowed?
No. The standard P(n,r) and C(n,r) formulas assume sampling without replacement, meaning each item can only be selected once. If repetition is allowed, the formulas change: permutations with repetition = n^r, and combinations with repetition = C(n+r-1, r). For example, a 4-digit PIN where digits can repeat uses 10^4 = 10,000 possibilities, not P(10,4) = 5,040. These cases arise in problems like counting arrangements of letters in a word with repeated characters.
How are combinations used to calculate lottery odds?
Lottery odds are a direct application of combinations because the order of drawn numbers does not matter. Powerball draws 5 white balls from 69 and 1 red ball from 26. The white ball combinations are C(69,5) = 11,238,513, multiplied by 26 red ball options gives 292,201,338 total combinations. Your jackpot odds are 1 in 292,201,338. Mega Millions has slightly worse odds: C(70,5) x 25 = 302,575,350. The overall odds of winning any Powerball prize (from $4 up) are approximately 1 in 24.87.

Related Calculators

Probability Calculator

Calculate event probability using combinations

Statistics Calculator

Compute descriptive statistics for a data set

Number Sequence Calculator

Generate and identify number sequences

Embed This Calculator

Permutation and Combination Calculator

Calculate
Reset
Calculators PlanetCalculators Planet

Fast, accurate, and user-friendly online calculators for all your needs.

Financial

  • Mortgage Calculator
  • Amortization Calculator
  • Mortgage Payoff Calculator
  • House Affordability Calculator
  • Rent Calculator

Math

  • Decimal to Fraction Calculator
  • Significant Figures Calculator
  • Percentage Calculator
  • Fraction Calculator
  • Ratio Calculator

Health

  • BMI Calculator
  • Ideal Weight Calculator
  • Body Fat Calculator
  • Calorie Calculator
  • Macro Calculator

Other

  • Age Calculator
  • Date Calculator
  • Time Calculator
  • Hours Calculator
  • Time Card Calculator

2026 Calculators Planet. All rights reserved.

BlogAboutContactPrivacy PolicyCookie PolicyTerms of ServiceDisclaimer