To calculate the correct end distance when cutting linear rail, determine the rail’s mounting-hole pitch, count the number of pitch intervals you want to keep, and subtract that hole-pattern length from the desired finished rail length. The remaining length becomes the combined end distance at the two ends of the rail. If the rail is symmetrical, divide that remainder equally between the two ends. If the application requires unequal end dimensions, assign the remainder between G1 and G2 accordingly.
The basic relationship is:
L = G1 + nP + G2
where:
L = finished rail length
G1 = distance from one rail end to the center of the first mounting hole
G2 = distance from the center of the last mounting hole to the opposite rail end
P = mounting-hole pitch
n = number of pitch intervals between the first and last mounting holes
If the rail is intended to have equal end dimensions:
G = (L − nP) ÷ 2
This gives the end distance from each rail end to the center of the nearest mounting hole.
The important point is that the mounting-hole pitch is already fixed in the rail. Cutting changes the rail-end dimensions, not the distance between the existing mounting holes.
What Is the End Distance on Linear Rail?
The end distance is the amount of rail between a physical rail end and the center of the nearest mounting hole.
At one end, we can describe this as:
G1
At the opposite end:
G2
A symmetrical rail might have:
G1 = 20 mm
G2 = 20 mm
An asymmetrical custom rail could instead have:
G1 = 20 mm
G2 = 35 mm
The correct values depend on the exact rail, manufacturer recommendations, finished length, and machine mounting pattern.
Why End Distance Matters Before Cutting
The mounting holes in profile rail are manufactured at fixed intervals.
When you shorten the rail, those holes do not move.
This means that changing the finished rail length directly changes the distance between the new rail end and the nearest mounting hole.
If this is not calculated before cutting, the result can be:
a partial mounting hole
a cut through a counterbore
a mounting hole too close to the rail end
an unnecessarily long unsupported end section
a rail that no longer matches the existing machine base
two rails with mismatched hole patterns
For that reason, the proper sequence is:
calculate first, cut second
The Basic End-Distance Formula
Start with:
L = G1 + nP + G2
If G1 and G2 are intended to be equal:
G1 = G2 = G
Then:
L = 2G + nP
Solving for G:
G = (L − nP) ÷ 2
This is the simplest way to calculate a symmetrical rail-end dimension.
Example: Calculating Equal End Distances
Suppose you need:
finished rail length = 1,240 mm
mounting-hole pitch = 60 mm
20 pitch intervals
First calculate the total length occupied by the pitch intervals:
20 × 60 = 1,200 mm
Subtract that from the total rail length:
1,240 − 1,200 = 40 mm
That 40 mm is the combined end distance.
For equal ends:
40 ÷ 2 = 20 mm
Therefore:
G1 = 20 mm
G2 = 20 mm
The finished rail geometry is:
20 + (20 × 60) + 20 = 1,240 mm
Example: Calculating Unequal End Distances
Now suppose the same rail must be:
1,250 mm
with:
20 pitch intervals × 60 mm = 1,200 mm
The total remaining end distance is:
1,250 − 1,200 = 50 mm
If the machine requires:
G1 = 20 mm
then:
G2 = 50 − 20
G2 = 30 mm
Therefore:
G1 = 20 mm
G2 = 30 mm
and:
20 + 1,200 + 30 = 1,250 mm
This rail is not symmetrical, but the geometry is completely defined.
How to Calculate G2 When G1 Is Known
If you already know G1, rearrange the basic formula:
G2 = L − G1 − nP
For example:
L = 1,250 mm
G1 = 20 mm
P = 60 mm
n = 20
Then:
G2 = 1,250 − 20 − (20 × 60)
G2 = 30 mm
This is useful when trying to match an existing machine where the position of the first mounting hole is fixed.
How to Calculate G1 When G2 Is Known
The same relationship works in reverse:
G1 = L − G2 − nP
Suppose:
L = 1,310 mm
G2 = 30 mm
P = 60 mm
n = 21
Then:
G1 = 1,310 − 30 − (21 × 60)
G1 = 20 mm
The rail geometry is therefore:
20 + 1,260 + 30 = 1,310 mm
Do Not Confuse Mounting Holes With Pitch Intervals
A common calculation error is multiplying the number of mounting holes by the pitch.
If a rail contains:
21 mounting holes
there are only:
20 pitch intervals
between the first and last mounting holes.
The rule is:
n = number of holes − 1
Therefore:
2 holes = 1 interval
10 holes = 9 intervals
21 holes = 20 intervals
31 holes = 30 intervals
Use the number of intervals in the rail-length formula.
Why This Matters When Measuring an Existing Rail
Suppose you measure an existing rail and find:
overall length = 1,240 mm
21 mounting holes
pitch = 60 mm
The number of intervals is:
21 − 1 = 20
The hole-pattern length between the first and last hole centers is:
20 × 60 = 1,200 mm
The remaining length is:
1,240 − 1,200 = 40 mm
If the rail is symmetrical:
G1 = G2 = 20 mm
You can then physically verify those dimensions at the rail ends.
If the measured end dimensions do not agree with the calculation, recheck:overall length
pitch
hole count
centerline measurement
before ordering or cutting a replacement.
How to Measure Mounting-Hole Pitch Accurately
Mounting-hole pitch should be measured from one mounting-hole center to the next.
When possible, improve accuracy by measuring across several intervals.
For example, suppose you measure from the center of hole 1 to the center of hole 6 and obtain:
300 mm
There are five pitch intervals.
Therefore:
P = 300 ÷ 5
P = 60 mm
This method reduces the influence of a small error in locating a single hole center.
What If You Already Know the Existing End Distance?
This is common in replacement applications.
Suppose the original rail has:
G1 = 20 mm
P = 60 mm
21 mounting holes
G2 = 20 mm
The existing rail length is:
L = 20 + (20 × 60) + 20
L = 1,240 mm
If you need the replacement to bolt directly onto the same machine base, reproducing:G1
G2
pitch
hole count
may be more important than choosing an arbitrary new overall length.
What Happens When You Cut One End?
Suppose a rail initially has:
G1 = 20 mm
G2 = 40 mm
If you remove:
10 mm
from the G2 end, the new geometry becomes:
G1 = 20 mm
G2 = 30 mm
The mounting-hole pitch remains unchanged.
If you remove:
25 mm
from the same end:
G2 = 15 mm
Again, the holes have not moved.
Only the distance between the final mounting hole and the newly created rail end has changed.
What Happens When You Cut Both Ends?
Cutting both ends can be useful if you want to preserve a symmetrical hole pattern.
Suppose a rail is 1,260 mm long and you want:
1,240 mm
If the existing hole pattern permits it, removing:
10 mm from each end
would reduce the rail length by:
20 mm
while preserving symmetry between the two ends.
Whether this is appropriate depends on the original mounting-hole positions and the exact rail drawing.
Never assume that removing equal amounts automatically produces the manufacturer's preferred end geometry.
Why Manufacturer Data Comes Before the Calculation
The formulas tell you what the resulting dimensions will be.
They do not tell you whether those dimensions are appropriate for a particular linear guide.
That requires the exact manufacturer's dimensional data.
THK, for example, publishes standard mounting-hole pitch F, rail-end dimensions G/g, standard rail lengths, and maximum rail lengths for individual LM Guide families. THK specifically recommends using values corresponding to the published G/g dimensions for special rail lengths and warns that increasing the end dimension can make that unsupported portion less stable and adversely affect accuracy.
Schaeffler similarly treats the distance from the rail end to the first mounting hole as part of the rail-length calculation. Its Linear Guide Calculator considers rail length, standard mounting-hole distance, and the minimum permitted end distance when determining the number of mounting holes and a symmetrical end dimension.
The lesson is:
Calculate the end distance, then verify that result against the dimensional requirements for the exact rail family.
There Is No Universal Correct End Distance
A value such as:
20 mm
might be standard for one rail family and completely inappropriate for another.
THK's product data demonstrates this clearly.
For HSR-M1 models 15 through 35, THK lists G/g values of 20 mm while using mounting-hole pitches of either 60 or 80 mm depending on size.
For the much smaller RSR family, published G/g dimensions include values as small as 4 or 5 mm, while mounting-hole pitches can be 8, 10, or 15 mm on the smallest models.
Therefore:
Do not use a generic end-distance rule across different linear-guide families.
Should G1 and G2 Always Match the Manufacturer's Standard Dimension?
Not necessarily.
The manufacturer's published standard dimension is an important reference point, especially for new designs.
But custom and replacement rails may require a different end geometry.
For example, an existing machine base might require:
G1 = 25 mm
G2 = 35 mm
even if a manufacturer's standard configuration normally uses symmetrical ends.
The correct approach is to determine:
what the machine requires
what the rail manufacturer permits
whether the resulting rail end is adequately supported
whether any mounting hole or counterbore is compromised
Why Excessively Large End Distances Can Be a Problem
A large end dimension means more rail extends beyond the outermost mounting fastener.
That portion of the rail is less directly supported by the machine base.
THK warns in multiple product families that increasing its G/g end dimensions makes this portion less stable and can negatively affect accuracy.
This is why simply leaving a large amount of unused rail beyond the last mounting hole is not always the best solution.
Why an Extremely Small End Distance Can Also Be a Problem
The other extreme deserves attention as well.
If a cut is made too close to the nearest mounting feature, the result may:
intersect a mounting hole
intersect the mounting-hole counterbore
create an undesirable rail-end geometry
leave insufficient material for the intended rail design
This is one reason manufacturer-specific minimum or recommended end-distance information matters.
Schaeffler's calculation method, for example, explicitly considers the minimum distance from the rail end to the first mounting hole when determining a valid hole pattern.
A Practical Cut-Length Calculation
Suppose you want a finished rail approximately:
1,500 mm
and the rail has:
P = 60 mm
You determine that 24 pitch intervals should remain.
The distance between the first and last mounting-hole centers is:
24 × 60 = 1,440 mm
If the rail is cut to exactly:
1,500 mm
the combined end distance is:
1,500 − 1,440 = 60 mm
For equal ends:
60 ÷ 2 = 30 mm
Therefore:
G1 = 30 mm
G2 = 30 mm
Before cutting, you would then check whether 30 mm is appropriate for that exact rail family.
What If the Calculated End Distance Is Poor?
Suppose the same rail instead needs:
1,470 mm
With 24 intervals:
1,470 − 1,440 = 30 mm
For symmetrical ends:
G1 = G2 = 15 mm
If 15 mm is not appropriate for the selected rail, you have several possible options:
adjust the finished rail length
use a different number of mounting-hole intervals
use unequal G1 and G2 dimensions if the machine permits
verify whether the manufacturer supports a special rail configuration
The correct solution depends on the actual application.
Slight Length Changes Can Produce Better End Geometry
In many new machine designs, the exact rail length has some flexibility.
Suppose:
1,485 mm
produces awkward end dimensions, but:
1,500 mm
produces an acceptable, symmetrical pattern.
If the extra 15 mm does not interfere with:
machine envelope
stroke
adjacent equipment
end stops
then the slightly longer rail may be the better engineering choice.
This is why finished rail length should be coordinated with mounting-hole geometry instead of selected independently.
When the Finished Length Cannot Change
Replacement machines often do not allow this flexibility.
The rail may need to fit:
an existing pocket
a fixed mounting plate
an enclosure
an established machine footprint
In that situation, treat the overall length as fixed and solve for the possible:G1
G2
hole count
using the known pitch.
If the resulting hole pattern cannot match the machine, the replacement may require:a different compatible rail
base modification
adapter plate
manufacturer-supported special machining
How to Calculate End Distance for a Replacement Rail
For an existing rail, measure:
overall length
mounting-hole pitch
number of mounting holes
G1
G2
mounting-hole diameter
counterbore diameter and depth
rail width
rail height
Then verify:
L = G1 + nP + G2
If the numbers agree, you have a strong check on the longitudinal mounting geometry.
If they do not agree, do not estimate.
Remeasure before ordering.
Do Not Assume Nominal Rail Size Determines End Distance
A designation such as:
size 25
does not establish:
mounting-hole pitch
G1
G2
standard rail length
hole diameter
counterbore geometry
Different manufacturers and different product families can use different dimensions even when the nominal guide size appears similar.
For replacement work, identify the exact:manufacturer
rail family
nominal size
whenever possible.
End Distance and Two Parallel Rails
If a machine uses two parallel rails, coordinate the cut geometry.
For rails intended to be identical, verify that both have the same:
finished length
mounting-hole pitch
G1
G2
hole count
This helps the rail pair correspond to the machine's prepared mounting-hole pattern.
Do not independently cut two rails by eye and assume the resulting mounting geometry will match.
End Distance Is Not the Same as Rail Spacing
End distance runs longitudinally along the rail.
Rail spacing runs transversely between two parallel rails.
They influence different aspects of the system.
End distance primarily affects:
hole-pattern placement
rail-end support
cut geometry
Rail spacing primarily affects:support footprint
roll-moment capability
carriage reaction forces
structural rigidity
End Distance Is Not the Same as Block Spacing
Block spacing describes the separation between linear-guide carriages.
It affects the support footprint and reaction to moment loading.
It is independent of the rail mounting-hole pitch and end dimensions.
A system could have:
G1 = 20 mm
G2 = 30 mm
P = 60 mm
block spacing = 400 mm
rail spacing = 550 mm
All of those are separate design dimensions.
Calculate Required Rail Length Before Optimizing the Ends
Good end geometry cannot compensate for a rail that is too short for the application.
Start with the mechanical requirements.
A useful preliminary relationship is:
Rail Length ≈ Required Stroke + Carriage-Group Footprint + End Allowance
Then evaluate whether the resulting approximate rail length can be adjusted to produce a suitable mounting-hole pattern.
The usual sequence should be:
required stroke → carriage arrangement → preliminary rail length → mounting-hole pitch → G1/G2 → final rail length
Do not reduce block spacing or required travel merely to obtain a convenient G dimension.
Maximum Rail Length Still Applies
End-distance calculations do not override manufacturer maximum rail lengths.
For long-stroke systems, check whether the desired rail length exceeds the maximum one-piece length for the selected guide.
THK, for example, publishes maximum rail lengths by model and notes that maximum length may vary with accuracy grade. For applications beyond available one-piece lengths, jointed rails may be required.
This should be resolved before the mounting base is finalized.
A Simple End-Distance Calculation Procedure
Use this process before cutting:
Step 1: Identify the Exact Rail
Record:
manufacturer
rail family
size
Step 2: Find the Mounting-Hole Pitch
Use the exact manufacturer dimensional drawing.
Step 3: Determine the Required Finished Length
Base this on:
required travel
carriage footprint
machine envelope
Step 4: Decide How Many Pitch Intervals Will Remain
Remember:
n = number of mounting holes − 1
Step 5: Calculate the Combined End Distance
Use:
G1 + G2 = L − nP
Step 6: Divide or Allocate the End Distance
For symmetry:
G = (L − nP) ÷ 2
For unequal ends:
G2 = L − G1 − nP
Step 7: Compare With Manufacturer Data
Verify that the resulting end dimensions are suitable for the exact rail family.
Step 8: Confirm the Cut Does Not Intersect a Mounting Feature
Check:
through hole
counterbore
threaded feature
Step 9: Verify the Complete Geometry
Check:
L = G1 + nP + G2
Step 10: Cut Only After the Numbers Agree
Do not rely on an approximate tape-measure location.
Common End-Distance Calculation Mistakes
Using Hole Count Instead of Pitch Intervals
Twenty-one holes have twenty intervals.
Assuming G1 Must Equal G2
Symmetry is convenient, not universal.
Ignoring Manufacturer Recommendations
The formula determines geometry, not whether that geometry is suitable.
Assuming the Same End Distance Works for Every Rail
End dimensions vary by manufacturer, family, and size.
Measuring Hole Pitch Edge-to-Edge
Pitch is measured center-to-center.
Cutting First and Checking Later
Once the rail is shortened, the lost material cannot be restored.
Matching Overall Length but Ignoring Hole Location
This commonly creates replacement-fit problems.
Forgetting Counterbore Geometry
A proposed cut may avoid the center of a hole but still intersect the larger counterbore.
Linear Automation USA's Perspective
At Linear Automation USA, we treat end distance as part of the cut-length specification, not as leftover material that happens to remain after cutting.
Before custom rail is processed, we want to understand:
exact manufacturer and series
nominal rail size
finished length
mounting-hole pitch
required G1
required G2
quantity
required stroke
carriage arrangement
whether the rail must match an existing machine
For replacement applications, the existing mounting-hole pattern is particularly important.
Our rule is:
Never finalize the cut length until you know where the first and last mounting holes will land.
Linear Automation USA's Resources page includes a Linear Rail Cut Calculator that uses information such as brand, rail size, pitch, buffer/end dimension, total rail length, and requested G1 to help evaluate cut geometry.
For a custom-cut application or unidentified replacement, you can also contact Linear Automation USA for assistance.
End-Distance Calculation Checklist
Before cutting rail, verify:
Manufacturer
Rail series
Nominal rail size
Mounting-hole pitch
Required finished length
Number of mounting holes
Number of pitch intervals
Calculated G1
Calculated G2
Manufacturer standard or minimum end-distance guidance
Mounting-hole diameter
Counterbore dimensions
Required stroke
Carriage-group footprint
Machine mounting pattern
Maximum rail length
Exact proposed cut location
Frequently Asked Questions
How Do You Calculate Linear Rail End Distance?
For equal end dimensions:
G = (L − nP) ÷ 2
where L is finished rail length, P is mounting-hole pitch, and n is the number of pitch intervals.
How Do You Calculate G2?
Use:
G2 = L − G1 − nP
How Do You Calculate G1?
Use:
G1 = L − G2 − nP
Do G1 and G2 Have to Be Equal?
No. They can differ when required by the machine or replacement mounting pattern.
What Is Mounting-Hole Pitch?
Mounting-hole pitch is the center-to-center distance between consecutive mounting holes along the rail.
Does Cutting a Rail Change the Pitch?
No. Cutting changes the distance between the rail end and the nearest existing mounting hole.
Should I Use the Manufacturer's Standard End Distance?
It is an important reference and should be checked for the exact rail family. Custom applications may use different values when permitted by the manufacturer and machine design.
Why Can a Large End Distance Be Undesirable?
More rail extends beyond the outer mounting fastener. Manufacturers such as THK warn that excessive end dimensions can make this unsupported portion less stable and negatively affect accuracy.
Can I Cut the Rail Anywhere Between Two Holes?
Do not assume so. Calculate the resulting end distance and verify that the cut avoids mounting holes, counterbores, and other required features.
Does the Correct End Distance Depend on Rail Size?
Yes, but not on nominal size alone. It depends on the exact manufacturer, series, size, and dimensional specifications.
What If the Required Length Gives a Bad End Distance?
Consider slightly adjusting the finished length, changing the number of pitch intervals, using unequal G1/G2 values if appropriate, or consulting the supplier about a special configuration.
Need Help Calculating the Correct Rail-End Distance?
For custom-cut rail, provide:
manufacturer
rail series
nominal size
mounting-hole pitch
desired finished length
desired G1 or G2 if one is fixed
required stroke
carriage quantity
quantity of rails
For replacement rail, also provide:existing overall length
hole count
G1
G2
mounting-hole and counterbore dimensions
photographs of the rail and carriage
Use the Linear Rail Cut Calculator to help evaluate custom rail geometry, or contact Linear Automation USA for help specifying the rail before it is cut.
Recommended Reading
What Are G1 and G2 Dimensions on Linear Rail?
Learn how G1 and G2 describe the mounting-hole pattern relative to the ends of a linear rail and why those dimensions matter for custom-cut and replacement rails.
Understanding Linear Rail Hole Spacing Before Cutting
Learn how mounting-hole pitch, hole count, end dimensions, and finished rail length interact before a custom rail is cut.
How to Cut Linear Guide Rail to Length
Learn how custom rail length should be planned around mounting-hole geometry, hardened precision surfaces, deburring, and cleaning.
How to Order Cut-to-Length Linear Rail
Learn what information to provide when requesting custom-cut rail, including manufacturer, series, rail size, pitch, finished length, G1, G2, and quantity.
How to Select Linear Rail Length
Learn how required travel, carriage footprint, block spacing, and end allowances influence the correct finished rail length.
Sources & Technical References
THK — High-Temperature Model HSR-M1
THK publishes standard rail lengths, mounting-hole pitch F, G/g end dimensions, and maximum rail lengths for the HSR-M1 family. THK also recommends using values corresponding to the listed G/g dimensions for special rail lengths and cautions that larger unsupported end dimensions can negatively affect accuracy.
THK — Standard and Maximum Lengths of HRG Rails
THK's HRG dimensional documentation shows the relationship between rail length, mounting-hole pitch, G/g end dimensions, and maximum manufactured rail length and provides similar guidance for special rail lengths.
THK — Standard and Maximum Lengths of RSR Rails
This dimensional reference illustrates how mounting-hole pitch and standard end dimensions vary substantially across smaller linear-guide models, reinforcing that there is no universal end-distance value.
Schaeffler — Linear Guide Calculator Help
Schaeffler explains that rail-hole count depends on rail length, standard mounting-hole distance, and minimum rail-end distance. Its calculator uses these relationships to determine a valid symmetrical end dimension.
Linear Automation USA — Resources
Linear Automation USA provides technical resources including a Linear Rail Cut Calculator for evaluating rail length, mounting-hole pitch, buffer/end dimension, and requested G1.
Linear Automation USA
Linear Automation USA supplies industrial linear-guide systems and supports custom-cut rails, replacement applications, and profile-rail selection.