Cartesian Product Calculator
Enter two or more sets and instantly see every ordered tuple in their Cartesian product.
Use the Cartesian Product Calculator
Define Sets
Define your sets and click Compute to see all ordered tuples.
Result
Output capped at 10,000 tuples for performance.
Copied!
Summary
The Cartesian product A × B of two sets is the set of all ordered pairs (a, b) where a belongs to A and b belongs to B. This tool extends that to up to four sets, computing every possible ordered tuple instantly in your browser.
How it works
- Enter elements of each set separated by commas (e.g. 1, 2, 3).
- Add up to four sets using the "+ Add Set" button.
- Click "Compute" to generate all ordered tuples.
- The result table lists every combination with tuple notation.
- Copy the full result as text or as a JSON array.
Use cases
- Generate all possible combinations of two or more finite sets.
- Enumerate test case inputs when each parameter has a fixed set of values.
- Illustrate Cartesian product concepts in discrete math coursework.
- Build a truth table skeleton by crossing boolean sets.
- Explore sample spaces in probability problems.
- Map every (row, column) coordinate pair in a grid.
Frequently Asked Questions
Last updated: 2026-06-11 · Reviewed by Nham Vu