Skip to main content
Tool Factory

Numbers, Units & Calculators

Cartesian Product Calculator

Generate combinations from two or more lists. Set the item and list delimiters, then review the ordered results.

Tool workspace

Needs input

Your input stays in this browser.

Add the required input to continue.

Input

Add your source and choose the required options.

Use commas between items and a blank line between lists with the default delimiters.

Options

Run the tool when your input is ready.

Your result appears here

Complete the required input to continue.

Direct answer

What Cartesian Product Calculator does

Cartesian Product Calculator forms combinations by taking one item from each list, in list order. With the default delimiters, enter comma-separated items and a blank line between lists. The lists a,b and 1,2 produce (a,1),(a,2),(b,1),(b,2).

Output

What you receive

The output contains parenthesized combinations. The rightmost list changes fastest. Two lists with 2 items each produce 4 combinations.

Use this tool

How to use Cartesian Product Calculator

  1. Enter at least two lists. Use commas between items and a blank line between lists with the default settings.
  2. Check Sample delimiter and Item delimiter. The default Sample delimiter \n\n means two line feeds.
  3. Select Run tool and inspect the complete output before copying or downloading it.

Processing

Browser processing

This tool processes its input in your browser. Your files and text stay on your device.

Limits

Check before you use the result

  • Input has a 100000 character limit. Output checks limit generation to 10000 results and an estimated 1000000 characters.
  • Use no more than 100 lists. The number of combinations multiplies with each list's item count.
  • The tool does not parse CSV quoting or remove duplicate items. Delimiter characters inside an item split that item.
  • Spaces and empty items remain part of the supplied lists. There is no special notation for an empty mathematical set.

Topics

Explore connected categories

Numbers, Units & Calculators