Track Layout Geometry

Here are some more advanced ideas for LEGO train layouts, while still keeping consistent with the restrictions of track geometry. While none of these ideas are original to myself (with the possible exception of the yard at the bottom), I hope this explanation will inform and inspire you to build better and hassle-free LEGO layouts.

In 2008, I gave permission for someone from ITLUG, the Italian LEGO® Users Group, to put out a translation of this page into Italian. Their website is down, but you can see the Italian Translation on the Internet Archive. (EDIT 11-Oct-2020: updated URL to Internet Archive)


  • This page was originally written several years before LEGO switched from powered 9V track to all-plastic track with battery trains. If you are using the all-plastic track you can ignore considerations of short circuits (see the Wye oh Wye? section).
  • The all-plastic Flex Track piece is not included in this discussion; that makes some track shapes easier to achieve, though trains are more likely to derail on Flex Track than normal track that is assembled according to the principles on this page.
  • The all-plastic Double Crossover track is also not included.
  • In recent years a number of LEGO fan owned companies have started producing LEGO-compatible track, mostly in all-plastic but some have produced 9V compatible track as well. These offer myriad options for curve radius and alternate switch designs. In this article however I’m only looking at LEGO-made track.

Table of Contents


LEGO track geometry is very limiting. There are only a handful of available pieces. From left to right, these are: straight, curve, left switch (or point), right switch, and cross track (Cross track was never made in all-plastic. Also, plastic-only parts such as Flex Track and the double crossover are not included in this document. See Notes, above.):

LEGO Track Parts

Each straight track piece is 16 studs long and 8 wide. The curved pieces produce a 22½° bend, so that 4 of them make a 90° turn. The switches have a different kind of curve in them, and they are meant to be used in conjunction with a curved track to produce parallel tracks. Here are some of the basic track concepts that are valid with LEGO track. Each one preserves perfect alignment with the studs on the large grey baseplate (48×48 studs).

Alignment Examples

Straight track can go anywhere. But in order for the alignment of tracks to be maintained consistently through curves and switches, it is necessary to adopt some standards. The standard that works best is:

  • Adjacent parallel tracks have a pitch of multiples of 16 studs; or put another way, 8 studs between tracks.
    This is dictated by the geometry of the LEGO track switch, which creates parallel tracks of this pitch.
  • On a 48×48 baseplate, tracks may run down the center of the baseplate or 4 studs in from either edge. This is for symmetry and in order to preserve the previous rule.
  • On a 32×32 baseplate, tracks may only run 4 studs in from either edge.
  • Horizontal and vertical track segments must begin and end on a baseplate boundary, except for dead-end spurs.

If you follow these rules, you will never have trouble getting your layout to line up.

On first glance you may think this is too limiting, because the following restrictions would seem to be implied by the above rules:

  • All curves must be 90°, consisting of 4 curve pieces.
  • All switches must have a curve piece on the “spur” end to make the track parallel to the “main” line.

However, there are some additional things you can do with LEGO track geometry that do not violate our rules. This is because in the real world, there is a little bit of slack in the connections, and the studs can still be made to line up with certain alternate configurations.



A crossover is where you have two parallel tracks with a line connecting them. The standard way is to take the switch geometry described above, and create a crossover where the two switches line up with a pair of curved tracks in between. But look at the right hand crossover: it also lines up, only instead of the two curves there is a single straight piece:


How does this work? Well, it turns out that 2 curved track pieces, when positioned at 22½° from horizontal, have the same amount of vertical distance between start and end as a single straight at that angle. Also, the horizontal distance is almost exactly double that of a straight.

But what if you put nothing in between? Then the tracks don’t line up right:

Bad Crossover

DON’T DO THIS. The areas circled in red are not lined up properly. If you want these tracks to line up elsewhere on your layout you will run into problems. Just add a straight or two curves (or two curves and several straights, to make a parallel track in between). Remember, a switch is NOT the same as a curve!


Changing Two Curves To a Straight

It’s not just crossovers that let you replace two curves with a straight. Here are some other situations where this trick can help avoid unnecessary zigzagging of your trains.


A standard "S" curve (left) is made with eight curves. But replace the two middle curves with a straight (right) for a smoother shape that uses less space.


A branch line coming off a switch can be given a gentler curve, and take up less real estate, with the same technique.


You can loop back on yourself by replacing 2 curves with a straight.

Room for Crossover

A crossover requires extra space between the parallel tracks. Here’s one way, using both types of "S" curves,

to separate them enough for a crossover without interfering with spacing on the rest of the main line.


Wye oh Wye?

A wye (named for the letter Y) is one of the most common ways for trains to turn around, and it allows you to connect the loops of your layout in different ways for interesting variations.

Caution: a wye made of powered LEGO (or any DC model train) track will have a short circuit! You will need to electrically isolate the track segments in at least one spot in order to make it work. You can do this by inserting paper between the track pieces before connecting them, and then cutting away the excess. Of course, if you are using plastic track that consideration does not apply.

The wye on the left uses standard LEGO geometry, with 4 curved tracks in each 90° turn. In the one on the right, the double curves (3 sets of them) are replaced by straights. This shrinks the size and produces more reasonable curves.



22½° Diagonal Track

Another convenient coincidence that comes in handy when designing layouts involves a straight track running at a 22½° angle. If you use 12 straight tracks with a curve at either end, you can still line up your track at both ends while having a more unusual track angle.

22 Degree Diagonal

This works because of the magic of Pythagorean triples. Like the well-known 3-4-5 triangle, you can make a perfect right triangle using dimensions of 5, 12, and 13. In such a case, the angle is 22.62°, which is close enough to 22½ that it works. Thanks to Jason Railton for pointing this out. But why is it 12, and not 13, you ask? Remember above where you can replace 2 curves with a straight? The 13th straight is replaced by the curves at either end of the 12. Note that a horizontal track of 12 units will line up nicely with the end of the diagonal track.

This trick only works if the begin and end of the turn are parallel. If you want to have the begin and end be perpendicular, you need an extra straight. Here’s why:

22 Degree Diagonal with Turn


45° Diagonal Track

There are no Pythagorean triples that produce anything close enough to a 45° angle, but we can use math to derive a result anyway. Trigonometry tells us that the distance traveled horizontally or vertically for each unit of diagonal movement is the sine of 45° (or cosine if you prefer; they’re equal for a 45° angle), or 0.7071. This is also half of the square root of 2 (1.4142). So we need a number that, when multiplied by 0.7071, produces something close enough to an integer that it will work with LEGO track.

1 x 0.7071 = 0.7071
2 x 0.7071 = 1.4142
3 x 0.7071 = 2.1213
4 x 0.7071 = 2.8284
5 x 0.7071 = 3.5355
6 x 0.7071 = 4.2426
7 x 0.7071 = 4.9497
8 x 0.7071 = 5.6568
9 x 0.7071 = 6.3639
10 x 0.7071 = 7.0710 Good
11 x 0.7071 = 7.7781
12 x 0.7071 = 8.4852
13 x 0.7071 = 9.1923
14 x 0.7071 = 9.8994
15 x 0.7071 = 10.6065
16 x 0.7071 = 11.3136
17 x 0.7071 = 12.0207 Better
18 x 0.7071 = 12.7278
19 x 0.7071 = 13.4349
20 x 0.7071 = 14.1420

The best choice is 17 straights, but you should be able make 10 work also.

45 Degree Diagonal


Thanks to Larry Pieniazek, David Koudys, and Jeff Van Winden for their postings in a thread about this topic on LUGNET.

Note: this requires that the beginning and end be perpendicular to line up properly. If you need the beginning and end to be parallel, add a right angle turn (four curves) to the above. You can simplify it by replacing two of the curves with a straight, but you will still need to go the “wrong way” with one curve track in order for it to line up:

45 Degree Diagonal without Turn


Diagonal Track with Switches

You can add a switch and curve to each end, or replace the two resulting curves with a straight, just like we did in the earlier crossover:

22 Degree Diagonal with Switch

The result is a pair of switches separated by 14 straights. Put several of these together, and you have a switching yard:

Switching Yard

We can also do the same thing with a 45° track:

45 Degree Diagonal with Switch


The Big Yard

Here is a big switching yard that uses several of the ideas shown here:

Big Yard

You can also find more ideas by Tim Strutt at his Brickshelf folder.


Track Designer files

When I first wrote this page, the gold standard for designing LEGO train layouts was the Track Designer program for Windows. However, that program is rarely used any more, and in fact the website that hosted it is no longer online as of 2020 (the link above is to the final Internet Archive version of the page). Track Designer was a pretty good program but the source code for it was lost in a disk crash and there was no backup, and so it was never continued or rewritten. These days, most people use BlueBrick instead to design their layouts, but I haven’t rebuilt these files in that program. If you do use Track Designer, here are the files for each of these examples (minus the text and arrows and such):


Image hosting courtesy of BrickShelf. You can also view this page as a BrickShelf folder.

Written on Nov 21, 2003.
Posted on on Nov 2, 2006.
Last updated Dec 4, 2020.

56 thoughts on “Track Layout Geometry”

  1. There are some limits to how much power you can get out of one regulator. The BayLTC layouts can be up to 40 feet (12m) on each side, so that’s a lot of track to power from one spot. One of the club members years ago upgraded two of the club’s regulators to use higher amperage, and also soldered wires to a couple segments of straight track so there is less power lost in connecting to the track. We then place these special segments of track on opposite sides of the layout, with long wires connecting back to the controllers. So it may look like we’re just using stock 9V train gear, but in reality we cheat a bit…

  2. You should add a way for viewers to select sets then use the digital “pieces” to plan out their tracks as a way to know what the want it to look like without any frustration with the actual thing.

  3. I modified the switches to eliminate the double curve. I can now make a full circle with 4 switches and some curved track. I’m using this plan (hidden below the surface) to change directions of my trains when needed. I wanted a twin track throughout my city subway with 2 stations and one or two open views between buildings, like in real life London, England.

  4. This is a useful resource. Thank You. I still use a product called Anyrail which is a lovely drag and drop tool which includes all LEGO and LEGO-compatible track parts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.