Gridwalk

Grid puzzles · Exact route counts

How many ways through your grid?

Mark open and blocked cells, then count every route from the upper-left to the lower-right using only right and down moves. See how the count builds, plus one clear example route.

Free · Exact integers · Browser-local

Your rectangular grid

Use a period . for an open cell and # for a blocked cell. Each line is one row. The example has two routes around the blocked centre.

1–40 rows and 1–40 columns, with equal row lengths. Only . and #; no spaces, header or interior blank rows. Maximum 2,000 UTF-16 code units. Start and destination may be blocked; that valid grid has zero routes.

Full model and input bounds · Worked examples

Exact result and example

Editing clears old counts, diagram and exports. Calculate again for current notes. Exact totals are not rounded or reduced modulo another number.

Count without listing every route

Each open cell adds the counts above and to its left. Reusing these counts makes even a 40 × 40 grid practical.

A zero result is useful

A barrier or blocked endpoint can remove every route. The layout is still valid, and its zero count can be saved.

One cell, no moves

A single open cell has one empty route. Starting at the destination needs zero moves, rather than zero routes.

This tool models a mathematical grid puzzle. It does not use maps, diagonals, backtracking, path costs, random sampling or real-world navigation.