nPr, nCr, n!, n^r and combinations-with-repetition — exact BigInt results with the formula and worked steps — browser-only
- Runs locally
- Category Calculator
- Best for Getting a realistic range before a purchase, plan, workout, or schedule decision.
Enter n (the total number of items) and r (how many you pick). All five counts are computed exactly with BigInt, so even 100! comes back with every digit correct — not a rounded approximation.
What this tool does
A permutation and combination calculator that gives you all five counts from a single pair of inputs: the number of permutations P(n, r), the number of combinations C(n, r), the factorial n!, permutations with repetition n^r, and combinations with repetition C(n + r − 1, r). Type n (how many items you have) and r (how many you pick) and every result updates instantly.
What makes this calculator trustworthy is the arithmetic. Most online permutation calculators do the math in 64-bit floating point, which silently loses precision once a factorial passes 21! (that is bigger than JavaScript's safe-integer limit of 2^53 − 1). This tool computes every value in BigInt, so 100! comes back with all 158 digits correct and C(52, 5) is the exact 2,598,960 poker hands — never a rounded approximation. For each row you also see the symbolic formula (P = n! / (n − r)!, C = n! / (r!(n − r)!)) and the substituted working, so you can copy the full step-by-step into homework or a spec. There is a one-click copy on every row and a "copy all" for the whole block, built-in examples (lottery 6/49, a 3-digit PIN, podium rankings, a shuffled 52-card deck), and clear bilingual error messages when r > n or an input is negative or not a whole number. Everything runs in your browser — no uploads, no logging.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Preview
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 10 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Student
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Permutation & Combination Calculator fits into your work
Use it for fast estimates, comparisons, and planning numbers before you make the final call.
Calculation jobs
- Getting a realistic range before a purchase, plan, workout, or schedule decision.
- Comparing scenarios by changing one input at a time.
- Turning rough assumptions into a number you can discuss.
Calculation checks
- Double-check units, dates, rates, and rounding assumptions.
- Treat health, finance, tax, and legal outputs as planning aids, not professional advice.
- Save the inputs that produced an important result so you can reproduce it later.
Good next steps
These links move the current task into a more complete workflow.
- 1 Scientific Calculator Scientific calculator — sin / cos / log / sqrt / power, with full keyboard input + history, deg/rad mode. Open
- 2 Probability Distribution Visualizer Probability distribution visualizer — normal/t/chi-sq/F/binomial/poisson/exp/uniform PDF+CDF, P(a≤X≤b) area, z/p table replacement. Open
- 3 Statistics Basic Calculator Basic statistics calculator — mean/median/mode/variance/std-dev/quartiles/range/IQR/skewness/kurtosis + histogram + box plot, paste any numbers. Open
Real-world use cases
Compute lottery odds before you buy a ticket
You want the real chance of matching all six numbers in a 6-from-49 draw. Enter n = 49, r = 6 and read the combinations row: C(49, 6) = 13,983,816. That is the number of equally likely tickets, so your odds of the jackpot on one line are 1 in 13,983,816. Steps: (1) set n to the size of the pool, (2) set r to how many numbers are drawn, (3) read C(n, r) — order does not matter in a lottery, so it is combinations, not permutations. Use the percentage-calculator afterwards to turn 1 / 13,983,816 into a percentage for a blog post.
Size a password or PIN search space
A security review asks "how many 8-character passwords are possible if each character is one of 95 printable ASCII symbols?". This is permutations WITH repetition because each position is independent and characters repeat. Enter n = 95, r = 8 and read n^r = 95^8 ≈ 6.6 × 10^15. Steps: (1) n is the alphabet size, (2) r is the length, (3) read the n^r row. Compare a 6-digit numeric PIN (n = 10, r = 6 → 1,000,000) to show stakeholders why length and alphabet matter more than "complexity rules".
Count tournament seedings and round-robin orderings
For a bracket you need the number of ways to award 1st, 2nd and 3rd place among 8 finalists. Order matters and no one wins twice, so it is permutations: enter n = 8, r = 3 → P(8, 3) = 336. Steps: (1) n = number of competitors, (2) r = number of ranked positions, (3) read P(n, r). For the full schedule of who-plays-whom, switch r to 2 and read C(8, 2) = 28 unique pairings in a round-robin.
Show students why 30% + 10% off is not 40% off — and check their combinatorics homework
A maths teacher assigns "in how many ways can 5 books be arranged on a shelf, and how many 3-book subsets exist?". Enter n = 5, r = 3: P(5, 3) = 60 arrangements, C(5, 3) = 10 subsets, and n! = 120 for the full-shelf arrangement. Steps: (1) read n! for arranging everything, (2) read P(n, r) for ordered sub-selections, (3) read C(n, r) for unordered ones. The worked-steps line under each result is copy-ready for the answer key, so marking is a paste rather than a recompute.
Count ice-cream scoop or topping combinations for a menu
A shop offers 6 flavours and lets customers pick 3 scoops, repeats allowed (three scoops of the same flavour is fine) and order on the cone does not matter. That is combinations WITH repetition: enter n = 6, r = 3 and read C(n + r − 1, r) = C(8, 3) = 56 distinct cones. Steps: (1) n = number of choices, (2) r = how many you pick, (3) read the C(n + r − 1, r) row when repeats are allowed but order is irrelevant. Useful for menu copy ("56 ways to build your cone") and inventory planning.
Common pitfalls
Using permutations when you mean combinations. If you write the lottery jackpot odds as P(49, 6) you get 10,068,347,520 — that treats 1-2-3-4-5-6 as different from 6-5-4-3-2-1, which a lottery does not. Lotteries are unordered, so the correct count is C(49, 6) = 13,983,816. Ask yourself "does reordering my picks create a genuinely different outcome?" — if no, use C.
Forgetting that "with repetition" changes which formula applies. A 4-digit PIN is NOT P(10, 4) = 5,040; it is 10^4 = 10,000, because digits can repeat. P(n, r) and C(n, r) both assume each item is used at most once. If your real-world problem lets the same item be chosen again, you need the n^r or C(n + r − 1, r) rows instead.
Trusting a calculator that uses floating-point for large factorials. Many tools show 25! as `1.55e25` or round the last digits — that is lossy. For exact counts in cryptography, combinatorial proofs, or a probability denominator, an approximate factorial silently corrupts the answer. This tool uses BigInt, so 25! comes out exact to the final digit.
Privacy
Every count — factorial, nPr, nCr, n^r, and the multiset coefficient — is computed with plain BigInt arithmetic inside your browser tab. No n, no r, and no result is ever sent to a server, and we keep no log of what you calculated. The one thing that does leave the page is the shareable URL: your current n and r are written to the query string (for example ?n=49&r=6) so a "share this calculation" link reproduces it for the recipient. Those are just two integers with no personal meaning, so it is safe to share, but if for some reason your n and r are sensitive, copy the result text instead of sharing the URL. A tiny preference (which row you last copied) is stored in your browser's localStorage and never leaves it.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Chinese Acupoint Locator 200+ meridian acupoints / WHO 2008 standard locations / with contraindications, manipulation, and combinations.
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Anagram Solver Check if two words are anagrams, rearrange a set of letters into every ordering, and read the sorted letter fingerprint, all in your browser
- Angle Converter Degrees, radians, gradians, turns, arcminutes, arcseconds and NATO mils, all from one input, copyable, browser-only