Math & Education
Permutation & Combination Calculator (nPr, nCr)
Calculate permutations (nPr) and combinations (nCr), with or without repetition, exactly — even for very large numbers.
How to use
- 1Enter n (items to choose from) and r (how many are chosen).
- 2Choose whether items can repeat.
How it's calculated
nPr = n! ÷ (n − r)!. nCr = n! ÷ (r!(n − r)!). With repetition: permutations = nʳ, combinations = (n + r − 1)Cr.
Frequently asked questions
Permutation or combination?
Use permutations when order matters (race positions, PIN codes) and combinations when it doesn't (lottery numbers, a committee).
What are the odds of winning a 6/49 lottery?
There are 49C6 = 13,983,816 combinations, so one ticket has a 1 in 13,983,816 chance of the jackpot.
Can r be larger than n?
Only with repetition allowed. Without repetition you can't choose more items than you have.
nPr and nCr differ by exactly r!
Both count ways to pick r items from n, but nPr cares about order and nCr doesn't, so nPr is always nCr × r!. The default example shows this directly: picking 6 numbers from 49 gives 13,983,816 combinations but 10,068,347,520 permutations, and dividing the second by the first gives exactly 720 = 6!. If you're ever unsure which to use, ask whether swapping the order of your 'picks' would count as a different outcome — a race's 1st/2nd/3rd does, a lottery's six numbers don't.
Why the math uses BigInt instead of regular numbers
Factorial-based counts explode fast — 49C6 is already in the millions, and the tool caps inputs at n and r up to 10,000, where nPr or nCr can reach hundreds of digits. JavaScript's ordinary numbers lose precision past about 9 × 10^15, so the calculator computes with BigInt internally and only switches to scientific notation for display once the result is too long to read as a plain integer (100C50 shows as 1.008913 × 10^29 rather than a 30-digit string).
Repetition changes which formula applies, not just the answer
Without repetition you're drawing from a shrinking pool, which is why r can never exceed n. Allow repetition and the formulas change shape entirely: permutations become n^r (each of r picks has the full n options again), and combinations-with-repetition use the 'stars and bars' formula C(n+r−1, r) — which also means r can now legitimately be bigger than n, since you're allowed to pick the same item multiple times.
49 P 6 is 49 × 48 × 47 × 46 × 45 × 44
Permutations are counted by multiplying downward, one factor for each item you pick, rather than by building two huge factorials and dividing them. For 49 items and 6 picks that is 49 × 48 × 47 × 46 × 45 × 44, which is 10,068,347,520. Combinations use the smaller of how many you pick and how many you leave behind, so choosing 43 out of 49 is counted the same way as choosing 6 out of 49. For 49 choose 6 the product is 44/1 × 45/2 × 46/3 × 47/4 × 48/5 × 49/6, which comes to 13,983,816. Each division lands on a whole number, so the count never picks up a fraction along the way.
6.5 is treated as 7, and 10,000.6 is too big
n and r are rounded to the nearest whole number before the limit is checked, and a .5 rounds up. 6.4 becomes 6 and 6.5 becomes 7. 10,000.4 is accepted as 10,000. 10,000.6 becomes 10,001 and is rejected with Use whole numbers from 0 to 10,000. A negative is rejected by the same message. Chance of one specific combination reads 1 in followed by the combination count, so the starting values of 49 and 6 read 1 in 13,983,816. Once a count has more than 15 digits it switches to scientific form: one digit, six more after the decimal, and a power of ten. That is why 100 choose 50 shows as 1.008913 × 10^29. Shorter counts keep ordinary commas, as in 13,983,816.
Related tools
- Flashcard Maker & Study App
Make flashcards and study them with spaced repetition — flip cards, mark what you know, and focus on the ones you miss. Paste a whole list at once. Free and saved in your browser.
- SAT to ACT Score Converter
Convert SAT scores to ACT composites and ACT to SAT using the official concordance tables — with approximate national percentiles to see how a score compares.
- Number to Words Converter
Spell out numbers in English words — US or UK style, lakh/crore for South Asia — plus cheque-writing format with cents, for any number up to the quadrillions.
- Roman Numeral Converter
Convert numbers to Roman numerals and Roman numerals back to numbers (1–3,999), with validation of properly formed numerals.
- Percentage Calculator
Every percentage question in one place: X% of Y, X is what percent of Y, percentage change, percentage difference, and increasing or decreasing by a percent.
- Lottery Number Generator & Odds
Generate random lottery numbers for Powerball, Mega Millions, EuroMillions, Eurojackpot, UK Lotto or a custom game — and see the jackpot odds.