Calculator
Formula used
- Repetition allowed: P = n^r where n is available symbols and r is slots.
- Multiset arrangement: P = n! / (n1! · n2! · … · nk!) where n is total items and ni are repeats.
How to use this calculator
- Select the model that matches your question.
- For n^r, enter n and r, optionally symbols.
- For multiset, enter repetition counts like 3,2,1.
- Press Calculate to show results under the header.
- Use the buttons to export a CSV or a PDF report.
Example data table
| Scenario | Model | Inputs | Result |
|---|---|---|---|
| 4-digit PIN using 10 digits | n^r | n = 10, r = 4 | 104 = 10,000 |
| License code from 26 letters, length 6 | n^r | n = 26, r = 6 | 266 = 308,915,776 |
| Arrangements of A A B B C | n! / Π ni! | counts = 2,2,1 | 5! / (2!2!1!) = 30 |
| Arrangements of M M M A T H | n! / Π ni! | counts = 3,1,1,1 | 6! / (3!1!1!1!) = 120 |
FAQs
1) What does “permutation with repetition” mean?
It means order matters, and you may reuse the same item. For example, a 4-digit PIN can repeat digits, so the count follows the n^r model.
2) When should I use n^r?
Use n^r when each of the r positions can be filled by any of the n symbols independently, and symbols can be reused without limit.
3) When should I use n! divided by repeated factorials?
Use the multiset formula when you have a fixed collection of items where some are identical, and you want the number of distinct arrangements of the whole collection.
4) Why can the answers get huge?
Exponentials and factorials grow very fast. This calculator also shows digit count and a compact scientific form to keep large outputs understandable.
5) What is the preview list showing?
If you enter symbols and use the n^r model, the tool lists the first K sequences in lexicographic order. It is only a preview, not the full set.
6) Is there a limit on r or total items?
Yes. r is capped for practical display, and multiset totals are capped to prevent heavy computation. Exports follow the same safe limits.
7) How accurate are the large results?
The calculator uses integer-safe string arithmetic for large counts. If BCMath exists on your server, it can compute n^r directly with big integers too.
8) Can I use this for probabilities?
Yes. First compute the total outcomes using this tool, then divide favorable outcomes by total outcomes. Keep the modeling consistent across numerator and denominator.