Maths

Discrete Math
calculators.

Discrete math tools cover counting (permutations, combinations, combinations with repetition, Pascal's triangle and advanced combinatorial numbers), logic (Boolean algebra and truth tables), set operations with Venn diagrams, sequences and recurrence relations, and structures such as permutation groups, Markov chains and two-player games.

13 tools · Updated October 21, 2026

Showing 13 tools

Which one do I need?

  1. Permutation CalculatorI want the number of ways to arrange r items from n, where order matters
  2. Combination CalculatorI want the number of ways to choose r items from n, where order does not matter
  3. Combinations with RepetitionI can pick the same item more than once and order does not matter
  4. Truth Table GeneratorI want a truth table for a logical expression
  5. Boolean Algebra CalculatorI want to simplify a Boolean expression
  6. Set Theory CalculatorI need unions, intersections and a Venn diagram for sets
  7. Markov Chain CalculatorI want the long-run probabilities of a Markov chain
  8. Recurrence Relation SolverI want a closed-form formula for a recurrence like aₙ = aₙ₋₁ + aₙ₋₂

Counting: permutations and combinations

Permutations count ordered arrangements: nPr = n!/(n − r)!. Combinations count unordered selections: nCr = n!/(r!(n − r)!). Choosing a president, secretary and treasurer from 10 people is a permutation (720 ways); choosing a committee of 3 is a combination (120 ways), because the committee is the same in any order.

When items can repeat, the formulas change. Combinations with repetition use the stars and bars method, which is right for problems such as choosing 6 donuts from 4 flavors. Pascal's triangle lists every nCr value, and the Advanced Combinatorics tool covers derangements, Stirling numbers and Bell numbers for more specialized counts.

Logic, Boolean algebra and sets

Propositional logic and Boolean algebra are the same structure with different notation: AND, OR and NOT in logic correspond to intersection, union and complement in set theory and to gates in digital circuits. De Morgan's laws, for example, say that NOT (A AND B) equals (NOT A) OR (NOT B).

The Truth Table Generator evaluates an expression for every combination of inputs, which is the surest way to check equivalence. The Boolean Algebra Calculator simplifies expressions, useful for reducing logic circuits, and the Set Theory Calculator draws Venn diagrams for two or three sets.

Recurrences, Markov chains and games

A recurrence relation defines each term from earlier ones, as the Fibonacci sequence does. Linear recurrences with constant coefficients have closed-form solutions found from a characteristic equation, which the Recurrence Relation Solver derives. The Sequence Analyzer works in the other direction, detecting a pattern from a list of terms.

A Markov chain models a system that moves between states with fixed probabilities, where the next step depends only on the current state. The Markov Chain Calculator finds n-step and steady-state probabilities. The Game Theory Calculator finds dominant strategies and Nash equilibria for two-player payoff matrices.

Questions people ask

Ask whether rearranging the same items gives a different outcome. If it does, as with rankings, passwords or seat assignments, use permutations. If it does not, as with hands of cards, teams or lottery tickets, use combinations.

Other maths topics