Skip to main content
Calcimator

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

False Outcomes3
True Percentage25%
Tautology (1=Yes)0
Contradiction (1=Yes)0
How to Use This Calculator
  1. Enter the Number of Variables (2 to 4) to set how many propositional variables (A, B, C, D) the table covers.
  2. Enter the Operation code (1=AND, 2=OR, 3=XOR, 4=IMPLIES, 5=NAND) to choose the logical connective applied across all variables.
  3. The calculator evaluates all 2^n rows, applying the operation left-to-right (or right-to-left for IMPLIES) across the variables.
  4. Review the Total Rows, True Outcomes, False Outcomes, and True Percentage to see how often the operation holds.
  5. 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

  1. Identify Input Parameters
    Number of Variables = 2, Operation = AND (left-to-right) = 2 variables, AND operation
  2. Calculate Total Rows
    Total Rows
    4 = 4
  3. Calculate True Outcomes
    True Outcomes
    1 = 1
  4. Calculate False Outcomes
    False Outcomes
    3 = 3
  5. Calculate True Percentage
    True Percentage
    25 = 25

Engine last updated . Checked against 9 independently-derived tests how we verify calculators.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.