Permutation and Combination Calculator
Enter values for n (total items) and r (selected items) to calculate permutations and combinations.
Steps for Calculation
- Input Values:
- Total items (n): Enter the total number of items (e.g.,
5
). - Selected items (r): Enter the number of items to select (e.g.,
3
).
- Total items (n): Enter the total number of items (e.g.,
- Calculate:
- Click the Calculate button to compute the permutation and combination.
- View Result:
- The permutation (nPr) and combination (nCr) will be displayed below the button.
Detailed Description
- Permutation (nPr):
- A permutation is the number of ways to arrange
r
items from a set ofn
items where the order matters. - Formula: nPr=n!(n−r)!nPr=(n−r)!n!.
- Example: For n=5n=5 and r=3r=3, the permutation is 5!(5−3)!=1202=60(5−3)!5!=2120=60.
- A permutation is the number of ways to arrange
- Combination (nCr):
- A combination is the number of ways to choose
r
items from a set ofn
items where the order does not matter. - Formula: nCr=n!r!⋅(n−r)!nCr=r!⋅(n−r)!n!.
- Example: For n=5n=5 and r=3r=3, the combination is 5!3!⋅(5−3)!=1206⋅2=103!⋅(5−3)!5!=6⋅2120=10.
- A combination is the number of ways to choose
- Factorial:
- The factorial of a number nn (denoted as n!n!) is the product of all positive integers less than or equal to nn.
- Example: 5!=5×4×3×2×1=1205!=5×4×3×2×1=120.
Example Calculation
For n=5n=5 and r=3r=3:
- Permutation (nPr): 5!(5−3)!=1202=60(5−3)!5!=2120=60.
- Combination (nCr): 5!3!⋅(5−3)!=1206⋅2=103!⋅(5−3)!5!=6⋅2120=10.