Truth Table Calculator

A truth table lists the output of a Boolean expression for every possible combination of its inputs, leaving nothing out. It is the most complete way to describe a logic function, and it is used to verify circuits, prove logical equivalences and design the conditions in software. For three variables there are exactly eight combinations, because each of the three variables can be 1 or 0 independently, giving two to the power three rows. This calculator builds the full truth table for the expression (A AND B) OR (NOT C), a representative formula that uses AND, OR and NOT together. It evaluates the expression for all eight rows, from A, B, C equal to 0, 0, 0 up to 1, 1, 1, and counts how many rows produce a true output. Seeing the entire table at once shows the complete behaviour of the function and makes patterns easy to spot. Every value is computed deterministically by evaluating the expression on each row, never sampled, so the table is exhaustive and reproducible. The expression, the row ordering and a worked example that reconciles to the table are shown in full below, including the count of true rows that the calculator reports.

For three variables there are 2^3 = 8 rows. For the expression (A AND B) OR (NOT C), the output is true in 5 of the 8 rows, false only when C is 1 and A and B are not both 1.

Source: US National Institute of Standards and Technology (NIST). As at 25 June 2026.

This tool tabulates a fixed three-variable expression
Total rows--
Rows where output is true--
Truth table (A B C : out)--

Formula

Expression: (A AND B) OR (NOT C)
Rows = 2^3 = 8 for three variables
Each row sets A, B, C to a distinct combination of 1 and 0

The calculator iterates over all eight combinations of A, B and C in order, evaluates (A AND B) OR (NOT C) on each, and records the output, then counts how many rows are true.

Worked example

Tabulate (A AND B) OR (NOT C) for all eight input combinations.

  1. Row A=0,B=0,C=0: (0) OR (NOT 0)=(0) OR (1)=1
  2. Row A=1,B=1,C=0: (1) OR (1)=1
  3. Row A=0,B=0,C=1: (0) OR (NOT 1)=(0) OR (0)=0
  4. Across all 8 rows, 5 give a true output

This fixed expression is the calculator's default, so the count of 5 true rows matches the widget exactly.

Truth Table Calculator: frequently asked questions

What is a truth table?

A truth table lists the output of a logic expression for every possible combination of its input values. It is the complete, exhaustive description of a Boolean function.

How many rows for three variables?

Eight. Each of the three variables can be 1 or 0 independently, so there are two to the power three, which is eight, combinations.

Which expression does this tabulate?

It tabulates (A AND B) OR (NOT C), a three-variable expression chosen to exercise the AND, OR and NOT operations together.

When is the output false?

Only when NOT C is 0 and A AND B is 0, that is when C is 1 and A and B are not both 1. That happens in three of the eight rows, leaving five true rows.

Why list every row?

Because a truth table is meant to be exhaustive. Showing all rows, not a sample, is the only way to fully describe the function and verify it.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.