Polygon Calculator

GEOMETRY & SHOP MATH
Across Corners
Side Length
Interior Angle
For a regular polygon: Across Corners = Across Flats / cos(180/n). Side Length = Across Flats × tan(180/n). Interior Angle = (n−2) × 180 / n.

Why polygon geometry matters on the shop floor

Hex bar stock, hex bolt heads, octagonal fixture plates, and any regular polygon stock all get specified by across flats, the distance between two parallel sides, rather than the across corners dimension a CNC program or a stock size chart actually needs. Converting between the two by hand means digging up trigonometry most people have not touched since school.

How the numbers are calculated

Across corners equals across flats divided by the cosine of pi over the number of sides. Side length equals across flats multiplied by the tangent of pi over the number of sides. Interior angle equals the number of sides minus two, multiplied by 180, divided by the number of sides. For a standard hexagon, that works out to a 120 degree interior angle, and an across corners dimension noticeably larger than the across flats size stamped on the stock.

Practical tips

When ordering bar stock or checking clearance in a fixture, use across corners for anything that needs to rotate or clear an opening, since that is the true maximum diameter of the part. Across flats is what wrenches and most vendor catalogs list, so keep both numbers on hand when specifying stock or designing a workholding pocket.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.