Generate Integer Pairs screenshot

Generate Integer Pairs

Build every (x, y) pair from two integer ranges, x major.

Privacy First
0 Runs
Updated 2026-11-06
No upload

What this page computes

Set the inclusive bounds of an x range and a y range and the page prints every ordered pair, x major: each x is paired with every y before x advances. The list is comma separated and the count is printed beneath it.

Where it stops

This is a cartesian product, not a random draw: there is no seed and no selection, so the same four bounds always print the same pairs in the same order. A range that starts above its own end is refused, and more than 200 pairs is refused with the count.

Why the answer repeats

The nested loops run in this tab, so the answer is reproducible by inspection and nothing is generated elsewhere or uploaded.

Every ordered (x, y) pair from two inclusive integer ranges, x major, with the pair count. It is a cartesian product with no randomness; a reversed bound and more than 200 pairs are refused.

How to use it

Set both ranges, then press Run. Pairs print in x-major order and the second line counts them.

The arithmetic

The count is the product of the two range widths. The loops advance x in the outer loop and y in the inner one, which is why (1, 1) and (1, 2) come before (2, 1).

What to Expect

Best for

  • building a test matrix
  • enumerating grid coordinates

What this tool keeps

  • the full pair list and its count

Sample input

x 1..2 and y 5..6

Sample output

(1, 5), (1, 6), (2, 5), (2, 6) Pairs = 4

Frequently asked questions

How do I use the generate integer pairs page?

Set the x and y bounds, then press Run.

Is anything uploaded?

No. The whole calculation runs in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once it has loaded.

What are its limits or bounds?

Each range's start must not exceed its end, and the product of the widths must be at most 200. A larger product must be refused with its count rather than truncated.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.