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-localYour 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.
Exact result and example
Right-and-down routes
- Rows × columns
- Blocked cells
- Moves per valid route
One right-first route
R = one cell right; D = one cell down. The start cell is included in the cell list.
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.