Truth Table Generator
Generate a complete truth table for propositional logic formulas with 2-4 variables and common logical operations.
Inputs
Results
Total Rows
4
True Outcomes
1
How to Use This Calculator
- Enter the Number of Variables (2 to 4) to set how many propositional variables (A, B, C, D) the table covers.
- Enter the Operation code (1=AND, 2=OR, 3=XOR, 4=IMPLIES, 5=NAND) to choose the logical connective applied across all variables.
- The calculator evaluates all 2^n rows, applying the operation left-to-right (or right-to-left for IMPLIES) across the variables.
- Review the Total Rows, True Outcomes, False Outcomes, and True Percentage to see how often the operation holds.
- Check the Tautology and Contradiction outputs to see if the operation is always true or always false across every row.
What each input means
- Number of Variables
- Number of propositional variables (A, B, C, D)
- Operation (1=AND, 2=OR, 3=XOR, 4=IMPLIES, 5=NAND)
- The logical connective applied between variables. IMPLIES is right-associative: A → B → C means A → (B → C). All other operations evaluate left-to-right.
How this is calculated
Worked example, using the default values
- Identify Input ParametersNumber of Variables = 2, Operation = AND (left-to-right) = 2 variables, AND operation
- Calculate Total RowsTotal Rows4 = 4
- Calculate True OutcomesTrue Outcomes1 = 1
- Calculate False OutcomesFalse Outcomes3 = 3
- Calculate True PercentageTrue Percentage25 = 25
Engine last updated . Checked against 9 independently-derived tests — how we verify calculators.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Logical Equivalence Checker
Test whether two propositional logic expressions produce identical truth values across all variable assignments.
Logic & Formal ReasoningBoolean Algebra Simplifier
Estimate Boolean expression simplification from sum-of-products form. Calculates term and literal reduction using grouping heuristics.
Logic & Formal ReasoningSyllogism Validator
Check the validity of categorical syllogisms by figure and mood. Identifies all 19 traditionally valid syllogistic forms.
Tabletop RPGTreasure Hoard Generator
Generate appropriate treasure hoard value from CR tier and party composition following D&D 5e guidelines.
More in Math & Statistics.