Updated: August 2026 • Verified v1.2

Hexagonal Grid Coordinate Converter & Distance Calculator

Creative & DesignNew

Local Browser Execution: Your input is processed locally in your browser and is not sent to UTL servers.
Hex_Distance = (|x1 - x2| + |y1 - y2| + |z1 - z2|) / 2; x = q, z = r, y = -x - z
Was this calculation helpful?

Understanding Your Results

Calculates step distance and straight-line pixel distance between any two hex coordinates, dynamically converts between Axial, Cube, and Offset formats, renders an interactive hex grid canvas, and exports distance code in TypeScript, Python, and Godot GDScript.

Practical Guidance & Next Steps

Cube coordinates (x + y + z = 0) simplify distance formulas to half the sum of absolute differences, eliminating messy conditional branch logic required in offset grids.

What is this?

A game development utility that converts between hexagonal coordinate representations and calculates tile step distances with an interactive canvas.

How does it work?

1. Enter axial coordinates (q, r) for Point A and Point B. 2. View instant conversions to Cube (x, y, z) and Offset (odd-r) coordinates. 3. Inspect the visual line on the interactive canvas and copy ready-to-use game code.

Why use it?

Simplifies hexagonal grid spatial algorithms and prevents off-by-one errors in turn-based game development.

Technical Scope & Calculation Limitations

Flat-topped hexagonal coordinate systems.

Frequently Asked Questions

In cube coordinates, every valid hexagon satisfies x + y + z = 0. This invariant represents a 2D plane sliced through a 3D coordinate space.
Windows Desktop & Widget Options

Want this capability on your Windows desktop?

All Windows widgets
Desktop Widget
9.4/10

Rainmeter Desktop Customization Engine

Powerful open-source desktop customization framework for hardware monitors, clocks, and audio visualizers.

FreeMedium InstallLow RAM
By Rainmeter Team (Open Source)View Widget
Complementary Utilities

Related Tools for Your Workflow

All Creative & Design tools
HTML5 / React / TypeScriptStatic Utility
HTML5 / React / TypeScriptStatic Utility
HTML5 / React / TypeScriptStatic Utility
HTML5 / React / TypeScriptStatic Utility