Skip to content
Yunedia Tools

Truth Table Generator

Generate a truth table for any propositional formula with AND, OR, NOT, XOR, implication and equivalence.

Examples:
Syntax
  • Variables: single letters A–Z (up to 6)
  • & or && : AND
  • | or || : OR
  • ! or ~ : NOT
  • ^ : XOR (exclusive or)
  • -> : implication
  • <-> : equivalence (iff)
  • Parentheses ( ) group sub-formulas
  • Precedence: ! > & > ^ > | > -> > <->

Classification: Contingent — true for some assignments, false for others

ABCResult
FFFT
FFTT
FTFT
FTTT
TFFT
TFTT
TTFF
TTTT

How to use

  1. Enter a formula with single-letter variables and operators, for example (A & B) -> C.
  2. Press “Generate truth table” to see the result for every truth assignment.
  3. The formula is also classified as a tautology, a contradiction or contingent.

Notes

Up to 6 variables are supported (at most 64 rows). Operator precedence is ! first, then &, ^, |, -> and <-> last. Type equivalence as <-> and implication as ->. Variables become columns in the order they first appear.

FAQ

Can variables be lowercase?
Yes, but a and A are treated as different variables, so keep your naming consistent.
Are intermediate sub-formulas shown as columns?
No. This tool shows only the variables and the final result for each row.