// tool
Logic Calculator_
Generate step-by-step truth tables for any proposition.
operators
input
examples
// fundamentals
What are Truth Tables?
A truth table is a fundamental tool of propositional logic that shows every possible truth value of a compound logical expression, as a function of the values of its simple propositions. With n variables, the table always has 2ⁿ rows, covering every possible combination of True (T) and False (F).
They are essential in discrete mathematics, analytic philosophy, digital circuit design and programming. They let you check the validity of arguments, simplify Boolean expressions and decide whether a formula is a tautology, a contradiction or a contingency.
// reference
Supported Logical Operators
The calculator supports the most common operators of propositional logic, from the classic connectives to the advanced ones used in Boolean algebra and digital design.
Flips the truth value of a proposition. If p is true, ¬p is false, and vice versa.
True only when both propositions are true at the same time.
True when at least one of the propositions is true.
False only when the antecedent is true and the consequent is false. Read as 'if p, then q'. You can also type →.
True when both propositions have the same truth value. Read as 'p if and only if q'. You can also type ↔.
True when exactly one of the two propositions is true, but not both.
Negation of the conjunction. False only when both propositions are true.
Negation of the disjunction. True only when both propositions are false.
True only when the antecedent is true and the consequent is false. Equivalent to ¬(p ⇒ q).
True when the propositions have different values. Equivalent to ¬(p ⇔ q).
Logical constant that is always true. Handy for building tautologies or testing simplifications, e.g. p ∨ 1.
Logical constant that is always false. For example, p ∧ 0 is always a contradiction.
// guide
How to use the Calculator
Type your expression
Use the keyboard or click the operator buttons to build your logical formula in the input field.
Pick an example
Not sure where to start? Choose one of the predefined examples such as tautology, biconditional or De Morgan.
Generate the table
Press the button or the Enter key. The calculator evaluates every possible combination of truth values.
Read the result
Review each resolution step and the full table. At the end you will see whether the expression is a tautology, a contradiction or a contingency.
// frequently asked questions
Frequently Asked Questions
What is a truth table?▼
A truth table is a mathematical tool of propositional logic that shows every possible truth value of a compound logical expression, depending on the values of its simple propositions. It was formalized by Ludwig Wittgenstein and Charles Sanders Peirce in the early 20th century and today is fundamental in mathematics, philosophy, computer science and digital electronics.
How many rows does a truth table have?▼
The number of rows is 2ⁿ, where n is the number of distinct propositional variables. For example, with 2 variables (p, q) there are 4 rows; with 3 variables (p, q, r) there are 8; with 4 variables, 16. Each row is a unique combination of True (T) and False (F) values.
What is a tautology?▼
A tautology is a logical formula that is true under every possible combination of values of its variables. The classic example is p ∨ ¬p (p or not p), known as the law of excluded middle. Tautologies are fundamental for validating logical arguments and designing digital circuits.
What is a logical contradiction?▼
A contradiction is a logical formula that is false under every possible combination. The simplest example is p ∧ ¬p (p and not p at the same time), which violates the law of non-contradiction. No consistent system can derive a contradiction.
What is a contingency?▼
A contingency is a logical formula that is neither a tautology nor a contradiction: it is true for some combinations of values and false for others. For example, p ∧ q is true only when both variables are true. Most everyday statements are contingencies.
How does the conditional operator ⇒ work?▼
The conditional p ⇒ q (if p then q) is false only when the antecedent p is true and the consequent q is false. In every other case it is true. This can feel counter-intuitive, but it is the formal definition used in mathematical logic and programming. The calculator also accepts the arrow → as a synonym.
