Truth Table Generator

Truth tables for Boolean expressions, with tautology check and canonical forms.

About this tool

Type a logical expression using words or symbols, or click an example. The generator lists every combination of variable values with the result, plus columns for each sub-expression if you want them. It classifies the expression as a tautology, contradiction or contingency, and gives the canonical sum-of-products and product-of-sums forms. You can copy the table as CSV.

Reading truth tables and logic operators

A truth table shows the value of an expression for every combination of its inputs: 2ⁿ rows for n variables, so 3 variables give 8 rows. AND (∧) is true only when both sides are true, OR (∨) when at least one is, XOR (⊕) when exactly one is, and NOT (¬) flips a value. NAND and NOR are the negations of AND and OR, and each alone can build any other gate. Implication P → Q is false only when P is true and Q is false, and P ↔ Q is true when both sides match. NOT binds tightest, followed by AND, XOR, OR, implies and iff, and brackets override everything. In the example (A ∧ B) → ¬C, the result is false only in the row where A, B and C are all true. The electronics notation A·B + A'·C works too, and letters written side by side are ANDed. A tautology is always true, like A ∨ ¬A, and a contradiction is always false. Comparing two expressions' columns shows whether they are equivalent; an implication and its contrapositive, (P → Q) ↔ (¬Q → ¬P), come out as a tautology. The canonical forms list exactly the rows where the expression is true or false, which is the starting point for simplifying logic circuits. The binary translator, the number base converter and the scientific calculator are related. Binary, explained from zero explains the 1s and 0s.

Frequently asked questions

How many rows does a truth table have?

2ⁿ for n variables: 4 rows for two variables, 8 for three, 16 for four.

When is an implication (P → Q) false?

Only when P is true and Q is false. In every other case it is true.

What is a tautology in logic?

An expression that is true in every row of its truth table, such as A ∨ ¬A.

Is my data saved?

No. Everything runs in your browser and nothing is stored or sent.