GRID & PATHFINDING

Grid Distance Calculator

Tile distance for square, hex, and isometric grids — Manhattan, Chebyshev, and more.

MOVEMENT MATH

Calculate tile distance

Browser-only
Tiles apart
Manhattan (no diag)
Square grids: Chebyshev (max(dx,dy)) if diagonal moves cost the same as cardinal — the standard for 4/8-direction games. Hex: max(|Δx|, |Δy|, |Δx + Δy|) in axial coords. Iso: Manhattan (dx+dy) since movement follows the diamond axes.

Grid distance guide

How far apart are two tiles? The answer depends entirely on your grid and movement rules: Manhattan, Chebyshev, hex distance, or isometric. Pick the wrong one and your pathfinding or range checks will silently disagree with what players see. This calculator computes distance for square, hex, and isometric grids.

Square grids have two answers

If movement is 4-directional (up/down/left/right), distance is Manhattan: dx + dy. If diagonal moves cost the same as cardinal moves, it is Chebyshev: max(dx, dy). If diagonals cost 1.4× (true Euclidean-ish), the distance is neither — it is a weighted blend, and many games just round it or use a step-based approximation.

The choice is a design decision about movement, and it affects pathfinding heuristics: the heuristic must never overestimate real cost, or A* becomes suboptimal.

Hex and iso are their own beasts

Hex distance in axial coordinates is max(dx, dy, dx − dy) — the largest of three differences. Isometric grids, because movement follows the two diamond axes, use Manhattan (dx + dy). The same two points can be 3 tiles apart in one system and 7 in another — know your grid before you write the range check.

Tip: Put grid distance in one function and use it everywhere — range checks, AI, pathfinding heuristics, AoE shapes. Inconsistent distance math is a top source of "the ability says 3 tiles but hits 4" bugs.

Frequently asked questions

What is the difference between Manhattan and Chebyshev distance?

Manhattan sums the axis differences (dx + dy) — 4-directional movement. Chebyshev takes the larger (max(dx, dy)) — 8-directional movement where diagonals cost the same.

How do I measure hex distance?

In axial coordinates: max(|dx|, |dy|, |dx − dy|). In cube coordinates it is (|Δq| + |Δr| + |Δs|) / 2. This tool handles both input styles.

Why does my AoE radius feel wrong?

You are probably using Euclidean distance (√(dx²+dy²)) on a grid where movement is discrete. Use the grid's native distance — Manhattan or Chebyshev — so the radius matches reachable tiles.

Privacy note: grid-distance calculations happen in your browser. Nothing is uploaded.