---
title: "Truth Table Generator - Boolean Logic Online | CanDoYa"
description: "Truth table generator for Boolean expressions with AND, OR, NOT, XOR, implication, and equivalence. See every row, minterm, and result instantly."
url: https://candoya.com/tools/truth-table-generator/
locale: en
type: browser-tool
---

# Free Truth Table Generator

Category: Calculators

## What is a truth table generator?

A truth table generator evaluates a Boolean expression for every possible combination of its variables. Enter logic with AND, OR, NOT, XOR, implication, or equivalence to see each true and false result, identify its minterms, and tell whether the expression is a tautology, contradiction, or contingent statement.

The parser accepts word operators such as `AND`, `OR`, `NOT`, `XOR`, `IMPLIES`, and `IFF`, plus familiar symbols such as `&`, `|`, `!`, `^`, `->`, and ``. NAND, NOR, constants, multi-letter variable names, and parentheses also work.

Your expression is parsed and evaluated locally with purpose-built JavaScript. It is never sent to a calculation service, and the parser does not run your input as code.

## How to use it

1. **Enter a Boolean expression** - Type variable names and operators, or choose a preset such as De Morgan's law.
2. **Check the generated rows** - The table updates live with every true and false assignment for up to eight variables.
3. **Read the classification** - See whether the expression is always true, always false, or contingent, and review its minterm and maxterm indices.
4. **Copy the table** - Copy the tab-separated table into a spreadsheet, notes app, or assignment.

## Who it's for

- **Logic students** checking propositional calculus exercises and homework.
- **Computer science students** tracing Boolean conditions before writing code.
- **Digital design learners** comparing the outputs of AND, OR, XOR, NAND, and NOR gates.
- **Teachers** preparing worked examples for lectures, quizzes, and worksheets.
- **Developers** testing whether two conditions cover the same combinations of inputs.

## Expert note

Implication is the operator that most often surprises learners: P implies Q is false only when P is true and Q is false. This generator parses implication from right to left, so P -> Q -> R means P -> (Q -> R); add parentheses whenever you intend a different grouping.

## Frequently asked questions

### Is my Boolean expression uploaded?

No. Parsing, row generation, and evaluation all happen locally in your browser. The tool does not send your expression or generated table to a server, so you can work with private exercises, circuit conditions, or application logic without uploading them.

### Is this truth table generator free?

Yes. The generator is free to use with no account, paywall, or download. Enter an expression, inspect every row, and copy the finished table as often as needed.

### How many variables can the truth table contain?

The generator accepts up to eight distinct variables, which produces at most 256 rows. A truth table doubles in size with each added variable, so this limit keeps the output responsive and readable on ordinary desktop and mobile browsers.

### Which Boolean operators can I use?

You can use NOT, AND, NAND, XOR, OR, NOR, implication, and equivalence. Type words such as AND and IFF, or symbols including !, &, |, ^, ->, and . The constants true, false, 1, and 0 are also accepted.

### What is the order of operations in a Boolean expression?

NOT is evaluated first, followed by AND or NAND, XOR, OR or NOR, implication, and then equivalence. Implication groups from right to left. Parentheses take priority over every operator, so use them whenever the intended grouping may be unclear.

### What is the difference between a tautology and a contradiction?

A tautology is true on every row of its truth table, such as P OR NOT P. A contradiction is false on every row, such as P AND NOT P. An expression with both true and false rows is classified as contingent.

### Why is P implies Q true when P is false?

Material implication is false only when its premise P is true and its conclusion Q is false. In every row where P is false, the conditional is true. This matches the equivalent expression NOT P OR Q and is the standard definition used in propositional logic.

## Related tools

- [Prime Factorization Calculator](https://candoya.com/tools/prime-factorization/)
- [Big Number Calculator](https://candoya.com/tools/big-number-calculator/)
- [Fraction Calculator](https://candoya.com/tools/fraction-calculator/)
- [Integral Calculator](https://candoya.com/tools/integral-calculator/)
- [Correlation Coefficient Calculator](https://candoya.com/tools/correlation-coefficient/)

---

*Markdown edition of <https://candoya.com/tools/truth-table-generator/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
