Combinatorics Calculator
Compute combinations C(n,k), permutations P(n,k), and total subset counts (2ⁿ) — the building blocks of counting problems and probability. This free online math calculator runs entirely in your browser — no signup, no data sent anywhere.
Inputs
Results
How It Works (Formula & Method)
Combinations: C(n,k) = n! / (k!·(n−k)!) — the number of unordered k-element subsets of an n-element set. Permutations: P(n,k) = n! / (n−k)! — the number of ordered k-arrangements. Total subsets of any size: 2ⁿ, because each element can independently be in or out.
Worked Example
Below is a worked example using the calculator's default values. The same numbers are pre-filled in the form above so you can press Calculate and see the result without typing anything.
Inputs used:
- n (total items): 10
- k (items chosen): 3
With these inputs, the calculator computes the metrics shown in the Results panel. Change any value and press Calculate again to see how the result responds — the live widget and the chart both update instantly.
About the Combinatorics Calculator
Combinatorics is the branch of mathematics that counts things — how many ways can you arrange or select items? It is the foundation of probability theory, statistics, cryptography, and discrete math. Two operations come up over and over: combinations (order does not matter) and permutations (order matters).
How to Use This Calculator
Enter n (the total number of items in your set) and k (the number you are selecting or arranging). The calculator returns C(n,k), P(n,k), and the total number of subsets of an n-element set (2ⁿ).
Tips & Considerations
- C(n,k) = C(n, n−k). C(5,2) = C(5,3) = 10.
- C(n,k) appears as a binomial coefficient — the coefficients of (a+b)ⁿ in Pascal's triangle.
- Permutations are always ≥ combinations: P(n,k) = C(n,k) × k!.
- For very large n, factorials overflow standard floating point. Use logarithms or Stirling's approximation for large-scale work.
Frequently Asked Questions
What is the difference between combinations and permutations?
Combinations ignore order: choosing {A, B, C} is the same as {C, A, B}. Permutations count order: ABC and CAB are different.
What is n!?
n factorial — the product n × (n−1) × (n−2) × … × 1. 5! = 120. 0! is defined as 1 by convention.
How is this used in probability?
Most probability calculations involve counting favorable outcomes over total outcomes. Combinations handle the unordered cases (poker hands, lottery numbers); permutations handle the ordered cases (race results, password arrangements).
What does the Combinatorics Calculator compute?
The Combinatorics Calculator takes 2 input values and returns 3 results. Calculate combinations C(n,k), permutations P(n,k), and total subsets 2^n. For probability, statistics, and counting problems.