Calculators
Delannoy Number Calculator
Calculate exact Delannoy numbers for grid paths with horizontal, vertical and diagonal steps, privately in your browser.
Count paths from (0, 0) to (m, n) using steps (1, 0), (0, 1), or (1, 1). Enter distances from 0 to 1000. Exact calculations stay in your browser.
Count lattice paths with diagonal steps.
The Delannoy number D(m, n) counts paths from (0, 0) to (m, n) using only east (1, 0), north (0, 1), and northeast (1, 1) steps. Paths cannot move backward. There are no obstacles or diagonal-boundary restrictions. The recurrence is D(m, n) = D(m − 1, n) + D(m, n − 1) + D(m − 1, n − 1), with D(0, n) = D(m, 0) = 1. The three terms correspond to the final step of a path. For example D(2, 2) = 13 and D(3, 3) = 63. D(0, 0) = 1 counts the empty path. Equal distances give central Delannoy numbers. Swapping m and n leaves the result unchanged. Unlike paths counted by a binomial coefficient, diagonal steps are allowed. Enter whole numbers from 0 to 1000 using up to four digits; leading zeros and surrounding whitespace are accepted. Signs, decimals, separators and scientific notation are rejected. A single-row dynamic program uses exact BigInt arithmetic and preserves every result digit. Inputs stay in your browser.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
Which steps are allowed?
East (1, 0), north (0, 1), and northeast (1, 1). There are no obstacles or boundary restrictions.
What is D(3, 3)?
D(3, 3) = 63. For comparison D(2, 2) = 13.
Why does a zero distance give one path?
Along an axis there is exactly one path. At (0, 0), the empty path counts as one.
Are large answers exact?
Yes. Browser BigInt arithmetic preserves every digit for distances from 0 to 1000.
Are inputs uploaded?
No. All calculations run locally in your browser.