What does this tool do?
The Permutation & Combination calculator instantly works out how many ways you can arrange or choose r items from a set of n. Alongside P(n,r) and C(n,r), it also shows permutations with repetition (nʳ) and combinations with repetition. It is handy for students tackling probability homework, anyone revising for exams and people solving everyday counting problems.
How to use it
- Enter your values into the fields.
- The result is calculated instantly.
- Read or copy the result.
Permutation or combination?
The difference comes down to whether order matters. If order matters, so that ABC and CBA count as different outcomes, you want a permutation, as with the top three finishers in a race. If order is irrelevant, so ABC and CBA are the same, you want a combination, as when picking a committee from a group. Because the tool shows both results side by side, you simply read off the value that matches your situation in seconds.
When repetition is allowed
Some problems let you pick the same item more than once. A four-digit lock, for instance, draws each digit independently from 0-9, so digits can repeat and the nʳ formula applies. Combinations with repetition cover cases where order is ignored but repeats are allowed, such as choosing five scoops from three flavours of ice cream. The calculator presents all four scenarios on one screen, letting you compare them without juggling formulas.
Frequently asked questions
What is the maximum value for n and r?
The calculator works for 0 ≤ r ≤ n ≤ 170. The 170 cap keeps factorials within JavaScript's number range (about 1.8×10³⁰⁸); larger values would overflow to infinity.
How are P(n,r) and C(n,r) calculated?
Permutations use P(n,r) = n! / (n−r)!, while combinations use C(n,r) = n! / (r!·(n−r)!). A combination is always less than or equal to the matching permutation.
Can the result be a decimal?
No. All four results are whole numbers because they count how many distinct arrangements exist. The tool formats values with thousands separators to keep large numbers readable.
Is Permutation & Combination free?
Yes. Permutation & Combination and all 300+ tools on MagmaNex are completely free with no signup or account required.
Is my data safe?
Yes. Everything runs locally in your browser. The data you enter is never sent to a server, stored, or shared.
Does it work on mobile?
Yes. Permutation & Combination works on phones, tablets and desktops — no app download needed.
🔒 Privacy: everything runs in your browser, your data is never sent to a server.
