G1 and G2 are the end dimensions that describe where the mounting-hole pattern begins and ends on a linear rail. G1 is the distance from one rail end to the center of the first mounting hole, while G2 is the distance from the center of the last mounting hole to the opposite rail end. These dimensions are especially important when ordering cut-to-length rail, matching an existing machine, or determining where a rail can be cut without creating an undesirable mounting-hole pattern.
A useful way to describe the relationship is:
L = G1 + nP + G2
where:
L = finished rail length
G1 = distance from the first 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
The important concept is that G1 and G2 describe the rail-end geometry, while P describes the fixed center-to-center spacing between the mounting holes.
What Does G1 Mean on a Linear Rail?
G1 is the distance between one end of the rail and the centerline of the first mounting hole.
Think of it as:
Rail End → G1 → First Mounting Hole
If the first mounting-hole center is 20 mm from the end of the rail:
G1 = 20 mm
When measuring an existing rail, G1 should be measured to the center of the mounting hole, not to the edge of the hole or the edge of the counterbore.
That distinction becomes important when trying to reproduce an existing mounting pattern accurately.
What Does G2 Mean?
G2 is the corresponding dimension at the opposite end of the rail.
Think of it as:
Last Mounting Hole → G2 → Rail End
If the center of the final mounting hole is 30 mm from the opposite rail end:
G2 = 30 mm
A rail could therefore be specified with:
G1 = 20 mm
G2 = 30 mm
Those values do not have to be identical.
Are G1 and G2 Standard Manufacturer Terms?
Not universally.
G1 and G2 are useful engineering designations for distinguishing the two end dimensions, but individual manufacturers may use different terminology.
THK, for example, commonly uses G and g in its dimensional tables for the distances between the rail ends and the adjacent mounting-hole centers.
Other manufacturers may use different letters or simply show the dimensions graphically on the rail drawing.
When communicating a custom rail requirement, the safest approach is to define the dimensions explicitly:
G1 = first rail end to first mounting-hole center
G2 = final mounting-hole center to opposite rail end
That avoids relying on terminology that may vary between manufacturers.
Why Are G1 and G2 Important?
G1 and G2 determine where the mounting-hole pattern sits within the finished rail.
They affect:
finished rail length
location of the first mounting hole
location of the last mounting hole
compatibility with an existing machine base
rail support near the ends
custom cutting
replacement interchangeability
A rail can have the correct overall length and still fail to mount correctly if the hole pattern is shifted relative to the machine.
That is why overall length alone is not enough to specify a replacement rail.
The Basic G1 and G2 Formula
The mounting-hole geometry can be expressed as:
L = G1 + nP + G2
Suppose:
G1 = 20 mm
G2 = 20 mm
P = 60 mm
n = 20 pitch intervals
Then:
L = 20 + (20 × 60) + 20
L = 1,240 mm
The finished rail length is therefore:
1,240 mm
This example produces a symmetrical rail with 20 mm between each rail end and the nearest mounting-hole center.
Hole Count Is Not the Same as Pitch-Interval Count
One of the easiest mistakes to make is multiplying the number of mounting holes by the mounting-hole pitch.
If a rail has:
21 mounting holes
there are:
20 pitch intervals
between the first and last holes.
The relationship is:
Number of pitch intervals = Number of mounting holes − 1
Therefore:
21 holes − 1 = 20 intervals
If the pitch is 60 mm:
20 × 60 = 1,200 mm
If G1 and G2 are each 20 mm:
20 + 1,200 + 20 = 1,240 mm
This is why rail length should not be calculated simply as:
number of holes × pitch
Do G1 and G2 Have to Be Equal?
No.
A symmetrical rail might have:
G1 = 20 mm
G2 = 20 mm
but another perfectly valid rail could have:
G1 = 20 mm
G2 = 35 mm
The proper end dimensions depend on:
rail series
manufacturer guidance
desired finished length
machine mounting pattern
replacement geometry
available space
For new machine designs, equal end dimensions can make the mounting pattern easier to lay out.
For replacement applications, matching the existing machine is usually more important than creating a symmetrical pattern.
Why Would G1 and G2 Be Different?
An existing machine may have its mounting holes positioned asymmetrically.
Suppose the original rail has:
G1 = 25 mm
G2 = 40 mm
If you replace it with a rail having:
G1 = 32.5 mm
G2 = 32.5 mm
the overall rail length might remain the same, but every mounting hole would be shifted relative to the machine base.
That replacement could therefore fail to bolt onto the machine even though:
the rail length is correct
the mounting-hole pitch is correct
the nominal rail size is correct
This is why G1 and G2 matter in replacement work.
Two Rails Can Have the Same Length but Different Hole Patterns
Consider two rails that are both 1,250 mm long.
Rail A:
G1 = 20 mm
G2 = 30 mm
P = 60 mm
Rail B:G1 = 30 mm
G2 = 20 mm
P = 60 mm
Both rails have the same:overall length
mounting-hole pitch
number of pitch intervals
But their mounting-hole patterns are shifted relative to the rail ends.
On a new machine this difference might be accommodated in the base design.
On an existing machine it may make the rail incompatible.
How Cutting a Rail Changes G1 or G2
When a linear rail is cut, the existing mounting holes do not move.
Suppose a rail has:
G1 = 20 mm
G2 = 40 mm
P = 60 mm
If 10 mm is removed from the G2 end, the new end dimension becomes:
G2 = 30 mm
The mounting-hole pitch is still:
P = 60 mm
If another 15 mm is removed:
G2 = 15 mm
Again, the pitch has not changed.
The cut only changes the distance from the new rail end to the nearest mounting hole.
This is one of the most important concepts in cut-to-length rail:
Cutting changes the end dimension, not the mounting-hole pitch.
Why You Should Calculate G1 and G2 Before Cutting
If the rail is cut without checking the resulting end geometry, the cut could create:
a mounting hole too close to the rail end
an unusually long unsupported end section
a partial mounting hole
a partial counterbore
a hole pattern that no longer matches the machine
a finished rail length that looks correct but cannot be installed
The safer process is:
Identify the exact rail.
Confirm the mounting-hole pitch.
Determine the required finished length.
Calculate the resulting G1 and G2.
Verify the cut location.
Cut only after the geometry has been confirmed.
G1 and G2 Are Closely Related to Mounting-Hole Pitch
The mounting-hole pitch is the fixed center-to-center distance between adjacent rail mounting holes.
If:
P = 60 mm
the holes remain 60 mm apart regardless of where the rail is cut.
The overall rail length can therefore be adjusted only through:
G1
G2
the number of pitch intervals
This explains why some custom rail lengths produce much cleaner mounting geometry than others.
Example: Selecting a Better Finished Rail Length
Suppose you want a rail around:
1,240 mm
The rail uses:
P = 60 mm
and you want:
G1 = 20 mm
G2 = 20 mm
Using:
L = G1 + nP + G2
with 20 pitch intervals:
L = 20 + (20 × 60) + 20
L = 1,240 mm
This gives you an even, symmetrical hole pattern.
Now suppose you requested:
1,250 mm
If the number of intervals remains the same:
1,250 − 1,200 = 50 mm
The combined G1 and G2 dimensions must total:
50 mm
One possibility is:
G1 = 20 mm
G2 = 30 mm
That may be completely acceptable.
The point is that the extra 10 mm does not alter the mounting-hole pitch. It appears in the end geometry.
G1 and G2 Do Not Have to Be Multiples of the Hole Pitch
Another common misconception is that a finished rail length has to be an exact multiple of the mounting-hole pitch.
It does not.
The pitch controls the distance between holes.
G1 and G2 account for the remaining length between the outer mounting-hole centers and the rail ends.
For example:
G1 = 20 mm
20 pitch intervals × 60 mm = 1,200 mm
G2 = 35 mm
Finished rail length:
L = 1,255 mm
There is nothing inherently unusual about the rail being 1,255 mm long simply because the pitch is 60 mm.
Manufacturer Recommendations Still Matter
Although G1 and G2 can vary, they should not be treated as arbitrary.
Manufacturers publish standard rail lengths and end dimensions for specific guide families.
THK, for example, publishes model-specific F, G, and g dimensions in its rail-length tables. It also notes that when special rail lengths are required, dimensions corresponding to the published G/g values are recommended because excessively large unsupported end sections can negatively affect stability and accuracy.
That means the best rail length is not simply whatever dimension happens to fit the available space.
The resulting rail-end geometry should also make engineering sense.
How to Measure G1 on an Existing Rail
To measure G1:
Identify one end of the rail.
Locate the first mounting hole.
Find the centerline of that hole.
Measure from the rail end to the hole center.
If the rail end is square and accessible, a caliper or accurate rule can often provide a useful measurement.
For replacement work, record the dimension rather than assuming it is identical to G2.
How to Measure G2
Repeat the same process at the opposite end:
Locate the final mounting hole.
Determine its center.
Measure from that center to the rail end.
Now compare:
G1
and
G2
They may be equal, but do not assume they are.
Verify G1 and G2 With the Overall Rail Length
After measuring an existing rail, verify the dimensions mathematically.
Suppose you measure:
L = 1,240 mm
P = 60 mm
21 mounting holes
G1 = 20 mm
G2 = 20 mm
There are:
21 − 1 = 20 pitch intervals
Therefore:
20 + (20 × 60) + 20 = 1,240 mm
Everything agrees.
If your dimensions do not reconcile, recheck the measurements before ordering the replacement.
Use Multiple Holes to Verify Pitch
When reverse-engineering an existing rail, do not rely on a single center-to-center measurement if you can avoid it.
Instead, measure across several pitch intervals.
Suppose the distance from the center of hole 1 to the center of hole 6 is:
300 mm
There are five intervals.
Therefore:
P = 300 ÷ 5
P = 60 mm
This method can reduce the effect of small measurement errors.
Why G1 and G2 Matter for Replacement Rails
A replacement rail usually needs to reproduce the existing mounting geometry unless the machine itself is being modified.
Record:
overall length
G1
G2
mounting-hole pitch
number of mounting holes
hole diameter
counterbore diameter
counterbore depth
rail width
rail height
Also record any manufacturer and part-number information from:rail markings
carriage markings
machine drawings
maintenance records
A nominal size alone should not be considered sufficient identification.
Do Not Assume Every Size-25 Rail Has the Same G1 and G2
A rail identified as:
size 25
does not define its complete geometry.
Rails of the same nominal size may differ in:
mounting-hole pitch
standard rail lengths
recommended end dimensions
rail width
rail height
mounting-hole diameter
counterbore dimensions
carriage dimensions
This is why replacement and interchange work should begin with the exact manufacturer and series whenever possible.
G1 and G2 in New Machine Design
For a new machine, the rail mounting pattern should ideally be incorporated into the base design after the exact guide has been selected.
Do not design a generic mounting plate around assumptions such as:
“We are probably going to use a size-25 rail.”
Instead:
Select the actual rail family.
Obtain its dimensional drawing.
Determine the required rail length.
Determine G1 and G2.
Lay out the mounting-hole pattern.
Design the machine base accordingly.
This reduces the risk of discovering late in the project that the selected rail does not match the machined base.
G1 and G2 on Two-Rail Systems
A typical linear axis uses two parallel rails.
If both rails are intended to be identical, their finished rail geometry should normally be coordinated.
That includes:
finished length
mounting-hole pitch
hole count
G1
G2
A mismatched end pattern may complicate installation or prevent the rails from fitting a pre-machined base.
This is particularly important when ordering custom-cut rail in pairs.
G1 and G2 Are Not Rail Spacing
G1 and G2 describe longitudinal dimensions along the rail.
Rail spacing is the transverse distance between two parallel rails.
The two concepts should not be confused.
G1/G2 affect:
rail length
hole locations
cut geometry
Rail spacing affects:support footprint
moment resistance
carriage reactions
machine rigidity
G1 and G2 Are Not Block Spacing
Block spacing refers to the distance between two carriages along a rail or guide axis.
It has no direct relationship to mounting-hole pitch.
A machine could have:
G1 = 20 mm
G2 = 30 mm
hole pitch = 60 mm
block spacing = 350 mm
rail spacing = 500 mm
Each dimension describes a different part of the guide system.
G1 and G2 Should Not Override Required Stroke
Good mounting-hole geometry is important, but the rail still has to provide enough usable travel.
A preliminary rail-length calculation might begin with:
Rail Length ≈ Required Stroke + Carriage-Group Footprint + End Allowance
After determining the approximate length, the designer can adjust the final dimension as needed to produce appropriate G1 and G2 values.
Do not shorten a rail so aggressively that it compromises:
required stroke
block spacing
machine clearances
carriage support
Hole-pattern optimization should occur within the application's actual mechanical requirements.
Maximum Rail Length Is a Separate Constraint
For long axes, G1 and G2 are not the only considerations.
Manufacturers also specify maximum one-piece rail lengths for individual guide families.
Maximum manufactured length may vary with:
rail series
size
accuracy requirements
manufacturing capability
If the required guideway exceeds the available one-piece length, the application may require manufacturer-supported jointed rails.
That issue should be resolved before finalizing the mounting-hole pattern.
Can You Simply Drill Different Holes Into the Rail?
Do not assume so.
Profile rail is a precision component with hardened raceway surfaces and carefully controlled geometry.
If the existing machine hole pattern does not match the replacement rail, possible approaches may include:
choosing a more compatible guide family
modifying the mounting base
using an engineered adapter plate
requesting manufacturer-supported special machining
The correct approach depends on the specific rail and application.
Common G1 and G2 Mistakes
Measuring to the Edge of the Hole
G1 and G2 should describe the distance to the mounting-hole centerline.
Assuming G1 Equals G2
They may be equal, but they do not have to be.
Ignoring G1 and G2 on a Replacement Rail
Matching overall length alone does not guarantee mounting compatibility.
Changing Rail Length Without Recalculating the End Dimension
Cutting changes the end geometry.
Assuming Nominal Rail Size Defines the Hole Pattern
It does not.
Multiplying Hole Count by Pitch
Use the number of pitch intervals, not the total number of holes.
Designing the Machine Base Before Selecting the Rail
The actual rail drawing should drive the mounting-hole layout.
Linear Automation USA's Perspective
At Linear Automation USA, we treat G1 and G2 as part of the rail specification rather than dimensions to worry about after the rail has already been cut.
For custom-cut rail, the question is not simply:
“What overall length do you need?”
We also want to know:
manufacturer
rail series
rail size
finished length
mounting-hole pitch
G1
G2
number of rails
required stroke
carriage configuration
existing hole pattern if the rail is a replacement
For replacement applications, photographs and measurements can also help establish whether the original mounting geometry needs to be reproduced.
Our rule is:
Never finalize a custom rail length until you know where the first and last mounting holes will land.
Linear Automation USA supplies industrial linear-guide systems and supports custom-cut rail and replacement applications. You can review available technical tools on our Resources page or contact Linear Automation USA for application assistance.
G1 and G2 Specification Checklist
Before ordering a cut-to-length rail, verify:
Exact manufacturer
Rail family
Rail size
Finished rail length
Mounting-hole pitch
Number of mounting holes
Number of pitch intervals
G1
G2
Mounting-hole diameter
Counterbore dimensions
Required stroke
Carriage quantity
Block spacing
Existing machine-hole pattern if replacing a rail
Whether the cut location interferes with any mounting feature
Frequently Asked Questions
What Is G1 on a Linear Rail?
G1 is the distance from one end of the rail to the center of the first mounting hole.
What Is G2 on a Linear Rail?
G2 is the distance from the center of the final mounting hole to the opposite rail end.
Are G1 and G2 Universal Manufacturer Terms?
No. Manufacturers use different terminology. THK commonly uses G and g for comparable rail-end dimensions.
Do G1 and G2 Have to Be Equal?
No. They may be equal for a symmetrical rail, but unequal values can be appropriate depending on the machine and required finished length.
Does Cutting a Linear Rail Change G1 or G2?
Yes. Cutting an end changes the distance between that new rail end and the nearest mounting-hole center.
Does Cutting Change Mounting-Hole Pitch?
No. The existing mounting holes remain in their original positions.
How Do You Calculate Rail Length From G1 and G2?
Use:
L = G1 + nP + G2
How Many Pitch Intervals Are There?
For a uniformly spaced rail:
Pitch intervals = number of mounting holes − 1
Why Do G1 and G2 Matter for Replacement Rail?
Because a replacement rail can have the correct overall length and still have mounting holes in the wrong positions.
Can G1 or G2 Be Changed?
They can change when the rail is cut, but the resulting geometry should be checked against the exact rail's dimensional requirements and the machine mounting pattern.
Need Help Specifying G1 and G2?
If you are ordering a custom-cut or replacement rail, provide:
manufacturer
rail series
rail size
required overall length
mounting-hole pitch
G1
G2
number of mounting holes
required stroke
quantity
For an unidentified rail, photographs of the rail and carriage plus accurate measurements can help establish the required geometry.
Use the Linear Rail Cut Calculator or contact Linear Automation USA for help determining the correct cut-to-length rail configuration.
Recommended Reading
Understanding Linear Rail Hole Spacing Before Cutting
Learn how mounting-hole pitch, end dimensions, hole count, and finished rail length interact before custom rail is cut.
How to Cut Linear Guide Rail to Length
Learn how to determine finished rail length, protect precision raceways, plan the mounting-hole pattern, and prepare a custom rail for installation.
Can Linear Rail Be Cut to Any Length?
Understand how mounting-hole pitch, end geometry, usable stroke, and manufacturer rail-length limits determine which custom lengths make engineering sense.
How to Order Cut-to-Length Linear Rail
Learn what information should be included when requesting custom-cut rail, including rail series, length, hole pitch, G1, G2, stroke, and quantity.
How to Select Linear Rail Length
Learn how required travel, carriage footprint, block spacing, and end allowance influence the proper linear rail length.
Sources & Technical References
THK — LM Guide General Catalog
THK's technical catalog provides model-specific rail dimensions, standard mounting-hole pitches, G/g end dimensions, standard rail lengths, and maximum manufactured lengths. It also provides guidance for special rail lengths and the effect of excessive unsupported rail-end dimensions.
THK — Notes on Ordering LM Guides
THK's ordering guidance provides additional information regarding guide configuration, ordering requirements, and rail-length considerations for specific precision requirements.
Schaeffler — Linear Guide Calculator Help
Schaeffler's calculation guidance explains how rail length, mounting-hole pitch, minimum end distance, and hole count interact when determining mounting-hole geometry.
Schaeffler — Linear Guides Select
Schaeffler's selection resources provide model-specific product and dimensional information for profile rail guide systems.
Linear Automation USA — Resources
Linear Automation USA provides technical resources for linear guide selection, including a Linear Rail Cut Calculator for evaluating rail length, pitch, and end-dimension relationships.
Linear Automation USA
Linear Automation USA supplies industrial linear-guide systems, custom-cut rail, replacement support, and application assistance for profile rail systems.