Npr Ncr Calculator






nPr and nCr Calculator – Permutations and Combinations


nPr and nCr Calculator

Calculate permutations and combinations from a set of ‘n’ items taken ‘r’ at a time.


The total size of the set from which you are choosing. Must be a non-negative integer.


The size of the subset you are choosing. Must be `0 <= r <= n`.

Results

Permutation (nPr):
Combination (nCr):

Bar chart comparing Permutation and Combination values. nPr nCr

A dynamic chart comparing the magnitude of nPr vs. nCr. Note that values can grow very quickly.

What is an nPr and nCr Calculator?

An nPr and nCr calculator is a tool used in combinatorics to find the number of possible permutations and combinations of a set. These concepts are fundamental in statistics, probability, computer science, and many other fields. The key difference lies in whether the order of the selected items matters.

  • Permutation (nPr): Calculates the number of ways to choose and arrange ‘r’ items from a set of ‘n’ items. Order matters. For example, if you are selecting a president and a vice-president from a group, the order of selection creates a different outcome.
  • Combination (nCr): Calculates the number of ways to choose ‘r’ items from a set of ‘n’ items, where the order of selection does not matter. For example, if you are selecting a committee of two people, choosing person A then B is the same as choosing B then A.

The nPr and nCr Formulas

The calculations performed by this npr ncr calculator rely on two distinct formulas that use factorials.

Permutation (nPr) Formula

The formula for permutations (where order matters) is:

nPr = n! / (n - r)!

Combination (nCr) Formula

The formula for combinations (where order does not matter) is:

nCr = n! / (r! * (n - r)!)

Variable Explanations
Variable Meaning Unit Typical Range
n The total number of distinct items in the set. Unitless (integer) Any non-negative integer (e.g., 0, 1, 5, 20).
r The number of items to choose from the set. Unitless (integer) An integer such that 0 ≤ r ≤ n.
! The factorial operator (e.g., 5! = 5 * 4 * 3 * 2 * 1). N/A Applied to non-negative integers.

Practical Examples

Example 1: Permutation (Order Matters)

Scenario: A race has 8 competitors. In how many different ways can the gold, silver, and bronze medals be awarded?

  • Inputs: n = 8 (total competitors), r = 3 (medals to be awarded).
  • Logic: The order matters (1st, 2nd, 3rd is different from 3rd, 2nd, 1st). We use the nPr formula.
  • Calculation: 8P3 = 8! / (8 – 3)! = 8! / 5! = (8 * 7 * 6 * 5!) / 5! = 336.
  • Result: There are 336 different ways to award the medals.

Example 2: Combination (Order Doesn’t Matter)

Scenario: You need to choose 3 toppings for your pizza from a list of 8 available toppings.

  • Inputs: n = 8 (total toppings), r = 3 (toppings to choose).
  • Logic: The order you choose the toppings doesn’t change the final pizza (pepperoni, mushrooms, onions is the same as onions, pepperoni, mushrooms). We use the nCr formula. For more details, see our probability calculator.
  • Calculation: 8C3 = 8! / (3! * (8 – 3)!) = 8! / (3! * 5!) = (8 * 7 * 6) / (3 * 2 * 1) = 56.
  • Result: There are 56 different pizza topping combinations.

How to Use This nPr nCr Calculator

Using this calculator is straightforward. Just follow these simple steps:

  1. Enter ‘n’: In the first input field, type the total number of items in your set. This must be a positive whole number.
  2. Enter ‘r’: In the second input field, type the number of items you wish to choose from the set. This number must be less than or equal to ‘n’.
  3. View Results: The calculator will automatically update as you type. The results for both Permutation (nPr) and Combination (nCr) will be displayed in the results box below the inputs.
  4. Check for Errors: If you enter invalid numbers (e.g., r > n), an error message will appear explaining the issue.

Key Factors That Affect Permutations and Combinations

  • The value of ‘n’: As the total number of items increases, both nPr and nCr values grow very rapidly.
  • The value of ‘r’: The values are typically largest when ‘r’ is close to half of ‘n’. As ‘r’ approaches 0 or ‘n’, the number of combinations decreases.
  • Order Importance: This is the most critical factor. If the order of selection creates a distinct outcome, you must use permutations. If it doesn’t, use combinations. The nPr value is always greater than or equal to the nCr value.
  • Repetition: This standard npr ncr calculator assumes items are not replaced (selection without repetition). If an item can be chosen more than once, different formulas are required.
  • The n >= r Constraint: It’s impossible to choose more items than are available in the set, so ‘r’ cannot be greater than ‘n’.
  • Factorial Growth: The factorial function grows extremely fast, which means that even for moderately large numbers (like n=70), the results can become too large for standard calculators to handle. Our tool can handle very large numbers by using scientific notation.

Frequently Asked Questions (FAQ)

What is the main difference between permutation and combination?

The main difference is order. In permutations, the order of the items matters. In combinations, it does not. A permutation is an ordered combination.

What does the ‘!’ symbol mean in the formulas?

The ‘!’ symbol denotes a factorial. The factorial of a non-negative integer ‘k’ is the product of all positive integers up to ‘k’. For example, 4! = 4 × 3 × 2 × 1 = 24. By definition, 0! = 1. A factorial calculator can help with these values.

Can ‘r’ be larger than ‘n’?

No. You cannot choose more items than what is available in the total set. The calculator will show an error if you try to set r > n.

What is the result if r = 0?

Both nP0 and nC0 are equal to 1. There is only one way to choose zero items from a set (by choosing nothing).

What happens if r = n?

For permutations, nPn = n! (the number of ways to arrange all items). For combinations, nCn = 1 (there is only one way to choose all the items from a set).

When should I use the npr ncr calculator?

Use it whenever you need to figure out the number of ways to group items from a larger set, such as in probability problems, scheduling, or contest outcomes.

Why is nPr always bigger than or equal to nCr?

Because nCr is derived from nPr. The combination formula is essentially the permutation formula divided by r! (nCr = nPr / r!). This division accounts for the duplicate groupings when order is ignored, so the result is smaller.

Does this calculator handle permutations with repetition?

No, this tool calculates permutations and combinations without repetition, which is the most common use case. The formula for permutations with repetition is simply n^r.

Related Tools and Internal Resources

If you found this npr ncr calculator useful, you might also be interested in our other mathematical and statistical tools:

© 2026 Your Company. All rights reserved. For educational and informational purposes only.



Leave a Reply

Your email address will not be published. Required fields are marked *