Cal11 calculator

C N R N-R Calculator

Reviewed by Calculator Editorial Team

This C n r n-r calculator helps you calculate combinations (C(n,r)) and permutations (P(n,r)) quickly and accurately. Whether you're a student studying probability or a professional working with statistical data, this tool provides the formulas, examples, and guidance you need.

What is C(n,r) and P(n,r)?

In combinatorics, C(n,r) represents the number of ways to choose r items from n items without regard to order, while P(n,r) represents the number of ways to arrange r items from n items where order matters.

Combinations are used when the order of selection doesn't matter (like choosing a committee from a group). Permutations are used when order matters (like arranging letters in a word).

Key differences

  • Combinations (C(n,r)) = C(n, n-r) because order doesn't matter
  • Permutations (P(n,r)) = P(n, n-r) × r! when order matters
  • P(n,r) = C(n,r) × r! because permutations account for order

When to use each

Use combinations when you need to count groups or selections where order doesn't matter. Use permutations when you need to count arrangements or sequences where order is important.

How to use this calculator

  1. Enter the total number of items (n)
  2. Enter the number of items to choose (r)
  3. Select whether you want combinations or permutations
  4. Click "Calculate" to see the result
  5. Review the detailed explanation and worked example

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

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

Formulas and assumptions

This calculator uses the standard combinatorial formulas:

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

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

Assumptions

  • n and r are positive integers
  • n ≥ r (you can't choose more items than you have)
  • Factorials are calculated using the gamma function for non-integer values

Limitations

For very large values of n and r, the calculator may show "Infinity" due to JavaScript's number precision limits. In such cases, consider using a more specialized combinatorial library.

Worked examples

Example 1: Combinations

Suppose you have 5 cards and want to choose 2 for a hand. How many different hands are possible?

C(5,2) = 5! / (2! × (5-2)!) = 10

There are 10 possible different hands.

Example 2: Permutations

How many ways can you arrange 3 letters from the word "CAT"?

P(3,3) = 3! / (3-3)! = 6

There are 6 possible arrangements: CAT, CTA, ACT, ATC, TCA, TAC.

Frequently asked questions

What's the difference between combinations and permutations?
Combinations count groups where order doesn't matter, while permutations count arrangements where order matters. For example, choosing a committee is a combination problem, while arranging letters is a permutation problem.
When should I use combinations vs permutations?
Use combinations when order doesn't matter (like selecting a team). Use permutations when order matters (like arranging letters in a word).
What if n is less than r?
The calculator will show an error because you can't choose more items than you have. Make sure n ≥ r.
Can I use this calculator for non-integer values?
Yes, the calculator uses the gamma function to handle non-integer values, but results may be less precise due to floating-point arithmetic limitations.
How accurate are the results?
The calculator uses JavaScript's built-in factorial function, which is accurate for integers up to 170. For larger values, consider using a more specialized combinatorial library.