Rail length calculation: P, E and where the joints land
2026-11-06
# Rail length calculation: P, E and where the joints land
A customer measures his machine, decides he needs 1,000 mm of travel, and orders a 1,000 mm rail. It does not fit. The rail is not the stroke, and the difference is not a rounding error — it is the block length plus the overtravel at each end.
The formula
For a single block on a single rail:
Rail length L = Stroke S + Block length Lb + 2 × E_min
Where Lb is the block length from the dimension table and E_min is the minimum end distance for that size.
Worked example, HGH20CA:
- Block length L = 77.5 mm
- Required stroke = 500 mm
- E for 20 size = 20 mm
500 + 77.5 + 2 × 20 = 617.5 mm → round up to the nearest hole pitch
Rounding to hole pitch
Rails are drilled on a fixed pitch P, with a fixed end distance E. A rail whose length does not land on the pitch cannot be drilled without a partial hole at the end, which weakens the mounting.
So the real calculation is: find the number of holes n such that
L = (n − 1) × P + 2 × E
For HGR20, P = 60 mm and E = 20 mm:
n = 10 → L = 9 × 60 + 40 = 580 mm
n = 11 → L = 10 × 60 + 40 = 640 mm
617.5 mm needed means you order 640 mm. Short by 22.5 mm of rail but correct on the pitch — and if you order 617.5, the factory has to either drill a partial hole or refuse.
Long rails and joints
Above roughly 4 m, rails ship in sections and are joined. Two rules that get ignored:
- Both rails of a pair must use the same number of sections and the same joint positions. Otherwise the block bridges two joints at different moments and the gantry skews as it travels.
- Do not put a joint where the block parks. A joint under a stationary block takes the load continuously and is the first place to develop a step.
The joint position is a drawing item, not a factory default. State it on the order.
What the end distance E actually is
E is the distance from the rail end face to the centre of the first hole. It is fixed per size because it comes from the rail's bending strength at the end — you cannot shrink it to save 10 mm.
For the standard sizes:
| Rail | P (mm) | E (mm) |
|---|---|---|
| HGR15 | 60 | 20 |
| HGR20 | 60 | 20 |
| HGR25 | 60 | 20 |
| HGR30 | 80 | 20 |
| HGR35 | 80 | 20 |
| HGR45 | 105 | 22.5 |
| HGR55 | 120 | 30 |
| HGR65 | 150 | 35 |
The three most common ordering mistakes
- Ordering rail length = stroke. Always add the block length and both end distances.
- Not rounding to pitch. A rail of 617 mm looks reasonable and cannot be drilled.
- Ignoring the second rail. On a gantry, both rails must be the same length and the same hole count, or the gantry will bind at one end of the stroke.
Do it in ten seconds
If you would rather not do the arithmetic, our replacement and sizing tool takes a model number and returns the block length and rail data for that size. Multiply out from there, or send us the stroke and we will return a drawing.