Permutation Calculator
Calculate the number of permutations for a given set of items.
Runs locally in your browser
Your inputs are processed locally in your browser and are not uploaded or stored by us.
The Permutation Calculator finds the number of ways to arrange r items from a set of n items where the order matters.
How to calculate permutations
- Enter the total number of items (n).
- Enter the number of items selected (r).
- Click "Calculate" to find the ordered arrangements.
Permutation Formula
nPr = n! / (n-r)!
In permutations, changing the order creates a different arrangement. The implementation evaluates only the factors required for the requested permutation and uses exact integer arithmetic internally. Therefore values such as 100P1 are valid when the final result remains within the supported safe-integer range.
Calculating 5P2
n (total items)5
r (selected items)2
5P2 = 5 × 4
Result: 20
Notes
- Inputs must be safe integers where n >= 0, r >= 0, and r <= n.
- Examples include nP0 = 1, nPn = n!, and 100P1 = 100.
- If the exact result exceeds the JavaScript safe-integer range, the calculator rejects the input rather than approximating it.
- The calculator preserves exact integer relationships within its documented limits.
- Your inputs are processed locally in your browser and are not uploaded or stored by us.