Understand the subject
Why are shortest grid paths combinations?
A shortest right-and-up path is completely determined by where its right steps occur among all its steps.
Use it for unobstructed rectangular grids with only monotone right and up moves.
See the structure
Choose the positions of the right steps
3 right + 2 up → choose 3 of 5 step slots
Worked example
Check the rule with a small case
A 3-by-2 grid requires 3 right and 2 up moves: C(5,3) = 10 paths.
Interpret with care
Choose the right counting model
Blocked cells, diagonal moves, backward moves, or non-shortest routes require another model.
Use the Permutation & Combination Generator when a small case needs to be inspected rather than only counted.
Quick guide
How to use this calculator
- Enter the required right and up steps.
- The path may use only those two directions.
- Read the number of distinct shortest paths.
Calculation method
Choose which steps are right steps
Every shortest path contains r+u steps. Choosing the r positions occupied by right steps determines the path.
Worked example
Cross a 3 by 2 grid
Every shortest path uses three right steps and two up steps.
C(5,3) = 10
Supported inputs
Precision and limits
Discrete domain
Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.
Exact integers
Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.
Obstacles
This calculator assumes an unobstructed rectangular grid and does not count diagonal or backward moves.