Hex & Square Across Corners Calculator: Bar Stock & Flats
To machine a regular polygon of Across-Flats width AF inside round bar stock, multiply AF by 1 / cos(180° / N): 1.154701 × AF for a Hexagon and 1.414214 × AF for a Square. A 19.0 mm hex measures 21.939 mm across sharp corners and requires at least Ø22.54 mm round stock.
Hex, Square & Polygon Across-Corners to Across-Flats Bar Stock Calculator
Convert wrench Across-Flats (AF) to sharp Across-Corners (AC = AF / cos(π/N)), turned-corner diameter, minimum commercial round bar diameter, flat width S, and radial milling depth of cut for Square (N=4), Hex (N=6), Octagon (N=8), and 12-Point profiles.
Formulas used: turned-corner diameter ACt = AC − 2 · corner allowance; flat width S = 2 · √((ACt / 2)2 − (AF / 2)2); corner-allowance limit (AC − AF) / 2, above which the turned corner consumes the flats.
Why Across-Corners Geometry Governs Bar Stock Selection & Collet Clearance
Whether you are milling wrench flats on a hydraulic adapter in a 4th-axis rotary indexer, polygon-turning a hex head on a CNC lathe with live tooling, or feeding hexagonal bar through an ER32 or ER40 collet chuck, the diagonal Across Corners (AC) dimension—not the nominal wrench flat size—determines whether the part will clean up inside round stock or pass through the spindle drawtube. As derived in Machinery's Handbook (31st Ed., Industrial Press) and general polygon trigonometry in the machinist right-triangle calculator, a regular N-sided polygon inscribed in a circle of diameter AC has an inscribed circle (Across Flats) of AF = AC · cos(π / N).
In shop practice, hex fastener heads and wrench flats governed by ASME Codes & Standards B18.2.1 and International Organization for Standardization (ISO) ISO 4014 never leave razor-sharp corners: a 15°–30° turning chamfer or radial corner break cbrk slightly reduces the required turned blank diameter to Dchamf = ACsharp − 2cbrk, while raw hot-rolled or cold-drawn round bar requires an additional radial turning allowance afinish (typically 0.4 to 0.8 mm per side) to remove mill scale and runout.
| Across Flats (AF) | Hex Across Corners (1.1547×AF) | Min Round Bar for Hex | Square Across Corners (1.4142×AF) | Min Round Bar for Square | Hex Side Width S |
|---|---|---|---|---|---|
| 1/4" (6.35 mm) | 7.33 mm (0.2887") | Ø7.93 mm (0.312") | 8.98 mm (0.3536") | Ø9.58 mm (0.377") | 2.78 mm hex flat |
| 3/8" (9.525 mm) | 11.00 mm (0.4330") | Ø11.60 mm (0.457") | 13.47 mm (0.5303") | Ø14.07 mm (0.554") | 4.65 mm hex flat |
| 1/2" (12.70 mm) | 14.66 mm (0.5774") | Ø15.26 mm (0.601") | 17.96 mm (0.7071") | Ø18.56 mm (0.731") | 6.50 mm hex flat |
| 13 mm Metric | 15.01 mm (0.5910") | Ø15.61 mm (0.615") | 18.38 mm (0.7238") | Ø18.98 mm (0.747") | 6.67 mm hex flat |
| 5/8" (15.875 mm) | 18.33 mm (0.7217") | Ø18.93 mm (0.745") | 22.45 mm (0.8839") | Ø23.05 mm (0.908") | 8.34 mm hex flat |
| 17 mm Metric | 19.63 mm (0.7728") | Ø20.23 mm (0.796") | 24.04 mm (0.9465") | Ø24.64 mm (0.970") | 8.99 mm hex flat |
| 3/4" (19.05 mm) | 22.00 mm (0.8660") | Ø22.60 mm (0.890") | 26.94 mm (1.0607") | Ø27.54 mm (1.084") | 10.18 mm hex flat |
| 24 mm Metric | 27.71 mm (1.0911") | Ø28.31 mm (1.115") | 33.94 mm (1.3363") | Ø34.54 mm (1.360") | 13.04 mm hex flat |
| 1" (25.40 mm) | 29.33 mm (1.1547") | Ø29.93 mm (1.178") | 35.92 mm (1.4142") | Ø36.52 mm (1.438") | 13.85 mm hex flat |
| 1-1/2" (38.10 mm) | 43.99 mm (1.7321") | Ø44.59 mm (1.756") | 53.88 mm (2.1213") | Ø54.48 mm (2.145") | 21.19 mm hex flat |
Inverse Problem: What Is the Largest Hex or Square You Can Mill from a Given Round Bar?
When a job arrives at the mill with a fixed shaft diameter D already turned, invert the secant multiplier to cosine:
• Largest Hex Across Flats inside Round Bar D: the sharp-corner limit AF = D · cos(30°) = 0.8660254 · D is theoretical only. With 0.50 mm cleanup per side and a 0.20 mm corner break, the millable limit is AFhex,max = (D − 0.6) · cos(30°) = 0.8660254 · D − 0.5196 mm, with radial step-down ap = (D − AFhex,max) / 2 per side.
• Largest Square Across Flats inside Round Bar D: with the same allowances, AFsq,max = (D − 0.6) · cos(45°) = 0.7071068 · D − 0.4243 mm, with radial step-down ap = (D − AFsq,max) / 2 per side.
• Largest Octagon Across Flats inside Round Bar D: AFoct,max = (D − 0.6) · cos(22.5°) = 0.9238795 · D − 0.5543 mm.
Once you select your bar diameter, compute the exact billet mass and shipping weight in our metal bar stock weight calculator (round, hex, flat & tube).
| Round Bar Stock ØD | Max Hex AF (0.8660·D − 0.5196 mm) | Hex Radial DOC ap | Max Square AF (0.7071·D − 0.4243 mm) | Square Radial DOC ap | Max Octagon AF (0.9239·D − 0.5543 mm) |
|---|---|---|---|---|---|
| Ø10 mm (0.394") | 8.14 mm (0.3205") | 0.93 mm/side | 6.65 mm (0.2617") | 1.68 mm/side | 8.68 mm (0.3419") |
| Ø12.7 mm (0.500") | 10.48 mm (0.4126") | 1.11 mm/side | 8.56 mm (0.3369") | 2.07 mm/side | 11.18 mm (0.4401") |
| Ø16 mm (0.630") | 13.34 mm (0.5251") | 1.33 mm/side | 10.89 mm (0.4287") | 2.56 mm/side | 14.23 mm (0.5601") |
| Ø19.05 mm (0.750") | 15.98 mm (0.6291") | 1.54 mm/side | 13.05 mm (0.5136") | 3.00 mm/side | 17.05 mm (0.6711") |
| Ø25.4 mm (1.000") | 21.48 mm (0.8456") | 1.96 mm/side | 17.54 mm (0.6904") | 3.93 mm/side | 22.91 mm (0.9021") |
| Ø32 mm (1.260") | 27.19 mm (1.0706") | 2.40 mm/side | 22.20 mm (0.8741") | 4.90 mm/side | 29.01 mm (1.1421") |
| Ø38.1 mm (1.500") | 32.48 mm (1.2786") | 2.81 mm/side | 26.52 mm (1.0440") | 5.79 mm/side | 34.65 mm (1.3640") |
| Ø50.8 mm (2.000") | 43.47 mm (1.7116") | 3.66 mm/side | 35.50 mm (1.3975") | 7.65 mm/side | 46.38 mm (1.8259") |
Worked Examples: 19 mm Hex Hydraulic Fitting & 1/2" Square Drive Tang
Worked Example 1 (19.0 mm Hex Wrench Flats): For a 19.0 mm hex (N = 6) with 0.20 mm corner break and 0.50 mm radial turning allowance, our engine computes sharp across corners 21.939 mm (0.8638"), turned-corner diameter 21.54 mm, minimum round bar stock Ø22.54 mm (0.887") (order a 25 mm bar, or any bar of at least 22.54 mm), flat face width S = 10.146 mm, and radial milling depth ap = 1.770 mm at every 60.0° index.
Worked Example 2 (1/2" / 12.70 mm Square Drive Male Tang): For a 12.70 mm square (N = 4), sharp across corners is 12.70 × 1.414214 = 17.960 mm (0.7071"), requiring at least Ø18.56 mm round stock and a radial milling cut of 2.930 mm per side. Check high-efficiency radial engagement feeds in the radial chip thinning calculator.
Before milling, measure the blank with a micrometer across the turned diameter and compare it with the minimum bar diameter above, so the cutter has room to clear the corners. After milling, check the across-flats dimension with a micrometer and the flat width S with a caliper or flat gage, and confirm the radial depth of cut on the first flat before running the full program.
Cite this page
ToolSpecVault Engineering Data Team. (2026, November 2). Hex & Square Across Corners Calculator: Bar Stock & Flats. ToolSpecVault. https://toolspecvault.com/hex-square-across-corners-bar-stock-calculator/