combinatorial number calculator

Enter a non-negative integer.
Enter a non-negative integer where k ≤ n.
Choose a calculation type, enter values, and click Calculate.
For performance, this tool limits input size to keep browser calculations responsive.

What is a combinatorial number calculator?

A combinatorial number calculator helps you count how many valid arrangements or selections are possible under a set of rules. Instead of listing every possibility by hand, you use formulas from combinatorics to get exact counts quickly.

This is useful in probability, statistics, data science, algorithm design, operations research, game analysis, and everyday planning problems (like forming teams, scheduling, or choosing subsets).

Core formulas supported by this calculator

1) Combinations: nCk

Use when order does not matter.

nCk = n! / (k!(n-k)!)

Example: Choosing 3 committee members from 10 candidates.

2) Permutations: nPk

Use when order matters.

nPk = n! / (n-k)!

Example: Awarding gold, silver, and bronze among 10 finalists.

3) Combinations with repetition

Use when items can be chosen more than once and order does not matter.

C(n+r-1, r), where n is the number of item types and r is selections.

Example: Choosing 6 donuts from 4 flavors when repeats are allowed.

4) Factorial: n!

Counts the number of ways to order n distinct items.

n! = n × (n-1) × ... × 2 × 1, with 0! = 1.

5) Catalan number

Catalan numbers appear in many counting problems: valid parenthesis strings, binary tree structures, polygon triangulations, and more.

Cn = (1/(n+1)) × C(2n, n)

How to pick the right mode

  • Order matters? Use permutations (nPk).
  • Order does not matter? Use combinations (nCk).
  • Can repeat choices? Use combinations with repetition.
  • Need full arrangement count of all items? Use factorial.
  • Working with structured combinatorial objects? Try Catalan numbers.

Why big integer math matters

Combinatorial values grow very quickly. Even moderate inputs can exceed normal 64-bit integer limits. This page uses JavaScript BigInt arithmetic so you can calculate exact values instead of inaccurate floating-point approximations.

Example problems

Example A: Lottery-style selection

You choose 6 numbers from 49 without caring about order: use combinations C(49, 6).

Example B: Password pattern assignment

You assign 4 different roles from 12 candidates in a specific order: use permutations P(12, 4).

Example C: Ice cream scoops by flavor

Choose 5 scoops from 3 flavors, repeats allowed, order irrelevant: use combinations with repetition C(3+5-1, 5) = C(7, 5).

Practical tips

  • Double-check whether order matters before choosing formula type.
  • Always verify constraints: k ≤ n for nCk and nPk.
  • Use symmetry in combinations: C(n,k) = C(n,n-k) for faster computation.
  • For large values, expect very long outputs (sometimes hundreds or thousands of digits).

Final thought

Combinatorics is a foundation for modern analytical thinking. Whether you are studying probability, building algorithms, or designing experiments, mastering counting techniques gives you a major advantage. Use this calculator to check work, explore patterns, and build intuition fast.

🔗 Related Calculators