Skip to main content

Numbers, Units & Calculators

Cartesian Product Calculator

List every combination from two or more sets, such as sizes × colors. Enter one comma-separated set per line.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

Run the tool when your input is ready.

Use commas between items and one set per line. Outer braces are optional.

Your result appears here

List every combination from two or more sets, such as sizes × colors. Enter one comma-separated set per line.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

The calculator pairs every item with every item in the other lists. Multiply list sizes to find the result count.

The result contains comma-separated tuples in parentheses. The rightmost list changes fastest.

  • List every size, color, and material variant of a product before you create SKUs.

Sources: Python documentation: itertools.product

Combine two lists across an empty line

Input: {a,b} {1,2}

Settings: One set per line; comma-separated members.

Result: (a, 1) (a, 2) (b, 1) (b, 2)

The first list supplies a or b; the second supplies 1 or 2.

Separate sets and interpret tuple order

  1. Separate items with Item delimiter.
  2. Separate lists with Sample delimiter. The default requires a blank line.
  3. Run the calculation after checking every list boundary.
  • Repeated items produce repeated tuples.
  • Spaces remain part of an item.
  • The parser does not interpret CSV quoting.