Permutation & Combination Calculator
Calculate permutations and combinations. Essential for probability, statistics, and counting problems.
This calculator counts ordered arrangements (permutations) or unordered selections (combinations) of r items pulled from a pool of n, switching formulas based on the Calculation Type you choose. It floors both n and r down to whole numbers rather than rounding to the nearest one, a subtly different rule that matters most right at the edge between two integers — 3.3 becomes 3 just as 2.7 becomes 2. The Calculation Type field works on strict equality: only a value of exactly 1 triggers the permutation formula, P(n, r) = n! divided by (n minus r)!; every other value, including 2, 3, or anything in between, falls through to the combination formula, C(n, r) = n! divided by (r! times (n minus r)!), with no validation that you actually meant to select combinations. Of the two counting inputs, r carries noticeably more pull over the result than n does at the calculator's default figures, since both counts grow factorially with r — dropping r from 3 to 2 alone cuts the result eightfold. There's no large-number fallback here: once P(n, r) or C(n, r) grows past what a standard floating-point number can represent exactly, the displayed result silently loses precision instead of switching to a logarithmic or scientific-notation-safe calculation the way some other counting calculators on this site do.
Inputs
Results
Result
720
How to Use This Calculator
- Enter n (the total number of items) and r (the number being selected or arranged).
- Choose Permutation to count ordered arrangements: P(n,r) = n! / (n−r)! — order matters.
- Choose Combination to count unordered selections: C(n,r) = n! / (r!(n−r)!) — order does not matter.
- r must be ≤ n and both must be non-negative integers; C(n,r) = C(n, n−r) by symmetry.
- Permutations are used for rankings and sequences; combinations are used for lottery odds and team selection.
- For very large n, results may exceed safe integer limits and be expressed in scientific notation.
How the result changes with r (Selected Items)
| r (Selected Items) | Result |
|---|---|
| 1.2 | 10 |
| 4.2 | 5,040 |
| 7.8 | 604,800 |
| 11 | 0 |
What each input means
- n (Total Items)
- Total number of items
- r (Selected Items)
- Number of items to select
- Calculation Type
- 1=Permutation (order matters), 2=Combination (order doesn't matter)
How this is calculated
Formula
Permutation: P(n,r) = n!/(n-r)!, Combination: C(n,r) = n!/(r!(n-r)!)Worked example, using the default values
- Identify Input Parametersn (Total Items) = 10, r (Selected Items) = 3, Calculation Type = 1 = 3 input(s) provided
- Calculate ResultResult720 = 720
- Calculate FormulaP(10,3) = 10! / (10-3)! = P(10,3) = 10! / (10-3)!
Engine last updated .
Frequently Asked Questions
Why does setting Calculation Type to 3 or 0 still give me a combination result?
The engine only checks whether Calculation Type equals exactly 1; every other value at all, whether it's 2, 3, 0, or anything else, falls through to the same combination formula. There's no validation step that rejects an out-of-range Calculation Type, so entering a stray value silently produces a combination count rather than an error flagging the input as unrecognized.
Why does entering n = 10.9 behave the same as entering n = 10?
Both n and r are floored down to the nearest whole number before any factorial math happens, since a counting problem can't work with a fractional number of items. Flooring always rounds toward the lower integer, so 10.9 becomes 10 just as 10.1 would, and the result only changes once your input crosses down past a whole-number boundary.
Why does r have more influence on the result than n does?
Both permutation and combination counts grow factorially in r, so even a small change to r removes or adds an entire multiplicative term from the running product. Nudging r from 3 down to 2 cuts the calculator's default result eightfold, a swing far larger than an equivalent nudge to n produces, since n only changes the size of the largest factor multiplied rather than how many factors are involved.
What happens once the result grows larger than a normal number can hold exactly?
JavaScript's standard number type can only represent whole numbers exactly up to about nine quadrillion; beyond that, results are still displayed but lose precision in their lowest digits, and a very large permutation count may appear in scientific notation instead of a full integer. Unlike some other calculators on this site, there's no logarithmic fallback here to preserve relative magnitude once that ceiling is crossed.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Factorial Calculator
Calculate factorial (n!) and double factorial (n!!). Useful for permutations, combinations, and mathematical calculations.
Math & StatisticsProbability Calculator
Calculate probability of single events, combined events (AND/OR), permutations, and combinations.
Discrete MathematicsPermutations & Combinations Calculator
Calculate permutations and combinations with or without repetition for any n and r values.
Discrete MathematicsBinomial Coefficient Calculator
Calculate nCr and nPr values with Pascal's triangle row visualization.
Math & StatisticsPercentage Calculator
Calculate percentages easily — find a percentage of a number, percentage increase/decrease, and percentage change between two values.
More in Math & Statistics.