Build truth tables from custom logic expressions. Track AND, OR, XOR, NAND, NOR, and implication. Visual summaries make logical behavior easier to verify quickly.
Use operator words or symbols such as NOT, AND, OR, XOR, ->, and <->.
| Operation | Accepted input | Meaning |
|---|---|---|
| Negation | NOT P, !P, ~P |
Flips a truth value. |
| Conjunction | P AND Q, P & Q, P && Q |
True only when both inputs are true. |
| Disjunction | P OR Q, P | Q, P || Q |
True when at least one input is true. |
| Exclusive OR | P XOR Q, P ^ Q |
True when inputs differ. |
| Implication | P -> Q, P IMPLIES Q |
False only when true implies false. |
| Equivalence | P <-> Q, P EQUIV Q, P IFF Q |
True when both sides match. |
| NAND / NOR | P NAND Q, P NOR Q |
Negated forms of AND and OR. |
Sample expression: P -> Q
| Row | P | Q | P -> Q |
|---|---|---|---|
| 1 | T | T | T |
| 2 | T | F | F |
| 3 | F | T | T |
| 4 | F | F | T |
A truth table lists every possible input pattern for n variables. The total number of rows is:
Rows = 2^n
Each row evaluates the expression with Boolean rules:
NOT(P) = ¬PP AND Q = P ∧ QP OR Q = P ∨ QP XOR Q = (P ∨ Q) ∧ ¬(P ∧ Q)P -> Q = ¬P ∨ QP <-> Q = (P ∧ Q) ∨ (¬P ∧ ¬Q)P NAND Q = ¬(P ∧ Q)P NOR Q = ¬(P ∨ Q)The calculator parses the entered expression, evaluates each row, and labels the final output as a tautology, contradiction, or contingency.
P, Q, and R.NOT, AND, OR, XOR, ->, or <->.T/F or 1/0 display output.It creates every possible truth-value combination for the variables in your expression and evaluates the final proposition for each row.
The table uses 2^n rows, where n is the number of distinct variables in the expression.
Yes. You can enter symbols like !, &, |, ^, ->, and <-> instead of operator words.
Intermediate columns show evaluated parts of a longer expression. They help you trace how the final result was built step by step.
A tautology is an expression that evaluates to true for every possible row in the truth table.
A contradiction is an expression that evaluates to false for every possible row in the truth table.
Variable order controls the column sequence and the row pattern. A consistent order makes comparisons easier across multiple expressions.
Yes. The page includes CSV and PDF export buttons for the current generated truth table.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.