Number Combination Counter (nCr)

Calculate combinations C(n,r) and permutations P(n,r) with formula breakdown, Pascal's Triangle row display, and step-by-step factorial evaluation.

Input

Result

All parameters set. Ready to execute!
Money Starter Kit

Get Free Money Making Tips

Join 2,000+ smart readers getting side-hustle ideas, passive income strategies, and proven finance tips delivered straight to your inbox.

No Spam
Privacy First
Instant Access
Client-Side Privacy
Instant Response
100% Free Forever

Number Combination Counter (nCr): Calculate Binomial Coefficients with Pascal's Triangle

The Number Combination Counter computes the binomial coefficient C(n, r) — the number of ways to choose r items from n items without regard to order — and simultaneously calculates P(n, r) permutations. In "Probability Theory," "Statistical Sampling," and "Algorithm Design," the combination formula is a fundamental counting principle. According to Blaise Pascal's Traite du Triangle Arithmetique (1665), the binomial coefficient governs everything from lottery odds to drug trial sample sizes. This tool computes exact integer results for values up to n=170 and displays the relevant row of Pascal's Triangle.

What is the combination formula and how is C(n, r) calculated?

C(n, r) = n! / (r! x (n-r)!) counts the number of ways to select r items from n distinct items where order does not matter. The key insight is that each combination of r items can be arranged in r! ways, so dividing the permutation count P(n, r) by r! eliminates order. For C(10, 3): 10! / (3! x 7!) = 3628800 / (6 x 5040) = 120. There are 120 ways to choose 3 items from 10. The efficient computation avoids factorial overflow by using the multiplicative formula: C(n,r) = product((n-i)/(i+1)) for i=0 to min(r, n-r)-1.

Combinations vs. Permutations

nrC(n,r) CombinationsP(n,r) PermutationsRatio P/C
5210202 (=2!)
1031207206 (=3!)
20515,5041,860,480120 (=5!)
5252,598,960311,875,200120 (=5!)
49613,983,81610,068,347,520720 (=6!)

6 Real-World Applications

  • Lottery Odds: A 6/49 lottery has C(49,6) = 13,983,816 possible combinations. The probability of winning the jackpot is 1 in 13,983,816.
  • Poker Hands: A 5-card poker hand from a 52-card deck has C(52,5) = 2,598,960 possible hands. The probability of a Royal Flush is 4/2,598,960.
  • Statistical Sampling: Choosing a committee of 5 from 20 candidates: C(20,5) = 15,504 possible committees.
  • Algorithm Complexity: Many brute-force algorithms iterate over all C(n,r) combinations. Knowing the count determines computational feasibility.
  • Binary Strings: The number of n-bit strings with exactly r ones is C(n,r). C(8,3) = 56 eight-bit strings have exactly 3 ones.
  • Drug Trial Design: Selecting r patients from n candidates for a treatment group: C(n,r) determines the number of possible trial configurations.

How to Use the Combination Counter

  1. Enter n: The total number of items to choose from.
  2. Enter r: The number of items to select (must be 0 <= r <= n).
  3. Execute: Click "Calculate." The tool computes C(n,r), P(n,r), shows the formula with step-by-step evaluation, and displays Pascal's Triangle row n.
  4. Interpret: The combination count answers "how many ways" questions; the permutation count answers "how many arrangements" questions.

Pascal's Triangle and the Binomial Theorem

Each entry in Pascal's Triangle is a binomial coefficient: the entry at row n, position r is C(n,r). The triangle satisfies the recurrence C(n,r) = C(n-1,r-1) + C(n-1,r), discovered by Yang Hui (1261 CE) and independently by Blaise Pascal (1653). The Binomial Theorem states (a+b)^n = sum of C(n,k) * a^(n-k) * b^k for k=0 to n. Our calculator displays up to 16 entries of the relevant Pascal's Triangle row for visual reference.

Frequently Asked Questions

What happens when r = 0 or r = n?

C(n,0) = C(n,n) = 1. There is exactly one way to choose nothing (the empty set) and one way to choose everything (the full set).

What is the maximum n this calculator handles?

The calculator produces exact results for n up to approximately 170. Beyond this, JavaScript's number precision (IEEE 754 double) causes rounding. For n <= 20, the full factorial expansion is also displayed.

What is the symmetry property?

C(n,r) = C(n, n-r). Choosing r items to include is equivalent to choosing n-r items to exclude. C(10,3) = C(10,7) = 120.

How are permutations different?

Permutations P(n,r) = n!/(n-r)! count ordered selections. Choosing 3 people for President, VP, and Secretary from 10 is P(10,3) = 720, not C(10,3) = 120, because the roles create order.

More Number Tools

Browse All

Min-Max Scaling Calculator

Kaprekar Number Checker

Digit Sum Calculator

Normalize Number to 0-1 Range

Significant Figures Calculator

Number Reversal Tool

Geometric Sequence Generator

Modular Arithmetic Calculator

Map Number Between Ranges

Integer Partition Generator

Pascal's Triangle Generator

Fibonacci Sequence Generator

Collatz Sequence Generator

Random Float Generator

Random Number Generator

Arithmetic Sequence Generator

Auto-Incrementing Number List

Prime Number List Generator

Number Format Localizer

Next Prime Finder

LCM Calculator

List of Divisors Generator

BCD Encoder

Happy Number Checker

Perfect Number Checker

Prime Number Checker

Prime Factorization Calculator

Number Digit Counter

Ordinal Number Formatter

Continued Fraction Converter

Number to IEEE 754 Formatter

BCD Decoder

Clamp Number to Range

Number Permutation Counter (nPr)

Factorial Calculator

Amicable Number Checker

Number Palindrome Checker

Fibonacci Number Checker

Armstrong Number Checker

Abundant Number Checker

GCD / HCF Calculator

Euler's Totient Calculator

Percentage to Fraction Converter

Percentage to Decimal Converter

Improper Fraction to Mixed Number

Mixed Number to Improper Fraction

Decimal to Fraction Converter

Fraction to Decimal Converter

Convert Number Between Bases

Roman Numerals to Number

Number to Roman Numerals

Engineering Notation Converter

Scientific Notation Converter

Number to Words Converter

Number Formatter