What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Discrete Math Calculator

Compare combinations and permutations for a finite selection problem.

Set the finite conditions

Discrete Math inputs

State the available objects, selection rule, and whether order changes the outcome.

Counting resultEnter the known values

The method, result, and an independent check will appear here.

Method for this result

  1. Complete the inputs and calculate.

Order-sensitivity check

  1. The check will use a different relationship or reverse operation where possible.

Objects, indices, and finite conditions

Symbols and inputs for Discrete Math Calculator
SymbolQuantityMeaning
nSize of the poolHow many different items are available to pick from.
rHow many you pickMust be no larger than n unless repeats are allowed.
n!Factorialn × (n−1) × … × 1, and 0! is defined to be 1.
|A ∩ B|OverlapHow many items are in both sets, which is what inclusion-exclusion subtracts once.

The counting or logical structure

P(n, r) = n! / (n − r)! C(n, r) = n! / ( r! · (n − r)! ) |A ∪ B| = |A| + |B| − |A ∩ B|

Start with a small case you can list

  1. The setup: 10 people, choose 3
  2. If the three jobs are different, order matters: P(10, 3) = 10 × 9 × 8
  3. Multiply: 720 ordered ways
  4. If they are just a committee, order does not matter: each committee of 3 was counted 3! = 6 times
  5. So divide: C(10, 3) = 720 ÷ 6
  6. The answer: 120 committees
  7. Read it: the same 3 people give 6 different podium orders but only 1 committee, which is exactly the factor of 6

Overlap, boundary, and logic errors

C(10, 3) = 10! / 3! = 604800

The (n − r)! in the denominator was dropped, so the seven people who were not chosen are still being arranged.

Repair: C(10, 3) = 10!/(3!·7!) = 120.

Using P(10, 3) for a committee

Permutations count Ann-Bob-Cara as different from Cara-Bob-Ann, but a committee does not care.

Repair: Divide by 3!: 720 ÷ 6 = 120.

60 + 45 = 105 students take at least one subject

The 25 who take both were counted twice, and 105 exceeds the 100 students available.

Repair: Subtract the overlap once: 60 + 45 − 25 = 80.

Test the structure on another finite case

  1. A different case: counting overlapping groups: 100 students, 60 take maths, 45 take physics, 25 take both
  2. Adding naively double-counts the overlap: 60 + 45 = 105, which is already more than the 100 students
  3. Inclusion-exclusion fixes it: |M ∪ P| = 60 + 45 − 25
  4. At least one subject: 80 students
  5. Neither subject: 100 − 80 = 20
  6. Only maths, and only physics: 60 − 25 = 35 and 45 − 25 = 20
  7. Check the four groups add back: 35 + 25 + 20 + 20 = 100 ✓

Which counting formula to use, with n = 10 and r = 3

Which counting formula to use, with n = 10 and r = 3
SituationFormulaValueExample
Order matters, no repeatsn! / (n − r)!720gold, silver and bronze from 10 runners
Order does not matter, no repeatsn! / (r!(n − r)!)120a 3-person committee from 10 people
Order matters, repeats allowedn^r1000a 3-digit PIN using digits 0–9
Order does not matter, repeats allowedC(n + r − 1, r)2203 scoops chosen from 10 ice-cream flavours
Arrange all of themn!3,628,800shuffling a 10-card deck

Questions about the discrete result

How do I decide between a permutation and a combination?

Ask whether swapping two chosen items gives a genuinely different outcome. Gold and silver medals: yes, so permutation. Two seats on the same committee: no, so combination. The combination is always the smaller number.

Why is 0! defined as 1?

Because there is exactly one way to arrange nothing, and because it keeps the formulas working. C(10, 10) should be 1, and 10!/(10!·0!) only gives 1 if 0! = 1.

What is the pigeonhole principle?

If you put more items than boxes, some box holds at least two. With 13 people, two must share a birth month, because there are only 12 months. It proves things exist without ever finding them.

Where is discrete math actually used?

Anywhere the objects come in whole units: hashing and password strength use n^r, network routing uses graphs, and program correctness uses logic and induction. Continuous calculus has almost nothing to say about any of it.

Understand the result from Discrete Math Calculator

Compare another tool, review the underlying idea, then solve a fresh problem without copying the example.

Calculators related to Discrete Math Calculator

See all calculators →

Graphing calculator

Explore this resource with editable values, visible working, and a result you can check.

Open free tool

Scientific calculator

Explore this resource with editable values, visible working, and a result you can check.

Open free tool

Four-function calculator

Explore this resource with editable values, visible working, and a result you can check.

Open free tool

Understand discrete mathematics behind this calculator

A calculator can check the arithmetic; use the discrete mathematics subject guide to rebuild the method, discrete mathematics practice questions to test selection, and the math formula library to confirm conditions and notation.