Finite Math

Truth Table Generator

Enter a propositional expression using p, q, r, s and the operators ! (not), & (and), | (or), -> (implies), <-> or = (iff), ^ (xor). The calculator parses the formula, evaluates it on every truth assignment and reports whether it is a tautology, contradiction or contingency.

Truth Table Generator

Build a truth table for any propositional formula over p, q, r, s.

Try:
AnswerContingency — sometimes true, sometimes false.
  1. Expression(p | q) -> r
  2. Variablesp, q, r
  3. Headerp | q | r | (p | q) -> r
  4. RowF | F | F | T
  5. RowF | F | T | T
  6. RowF | T | F | F
  7. RowF | T | T | T
  8. RowT | F | F | F
  9. RowT | F | T | T
  10. RowT | T | F | F
  11. RowT | T | T | T
  12. ClassificationContingency — sometimes true, sometimes false.

Worked examples

Frequently asked questions

What operators can I use?

! or ¬ for NOT, & or ∧ for AND, | or ∨ for OR, -> or → for IMPLIES, <-> or ↔ or = for IFF, and ^ or ⊕ for XOR. Spaces and parentheses are allowed.

How many variables are supported?

Up to four: p, q, r, s. With four variables the table has 16 rows.

What is the difference between a tautology, a contradiction and a contingency?

A tautology is true in every row, a contradiction is false in every row, and a contingency is sometimes true and sometimes false.