Spirograph online
The toy’s gears, worked out exactly. Pick the ring and wheel sizes in teeth and the pen hole, stack up to three curves, and download the drawing.
How to use it
- Set the Ring size in teeth and choose whether the wheel rolls Inside or Outside it.
- Set each Wheel in teeth and its Pen hole: 1 is the wheel’s rim, smaller numbers are holes nearer the centre.
- Add a second or third layer in another colour for the layered look of a real spirograph page.
- Download SVG for plotters and laser engravers, PNG for screens, or a PDF to print and colour.
The maths behind the gears
A wheel rolling inside a ring traces a hypotrochoid; rolling outside, an epitrochoid. With a ring of R teeth, a wheel of r teeth and the pen at distance d from the wheel’s centre, the pen follows:
x = (R − r)·cos t + d·cos((R − r)/r · t)y = (R − r)·sin t − d·sin((R − r)/r · t)
Because teeth are whole numbers, the drawing always closes. It takes r ÷ gcd(R, r) trips around the ring, where gcd is the greatest common divisor. A 105-tooth ring with a 48-tooth wheel shares a divisor of 3, so the wheel goes round 16 times and draws 35 loops.
Picking numbers
The fewer factors the ring and wheel share, the more loops you get.
| Ring | Wheel | Trips round the ring | Loops |
|---|---|---|---|
| 96 | 48 | 1 | 2 |
| 105 | 63 | 3 | 5 |
| 105 | 48 | 16 | 35 |
| 150 | 84 | 14 | 25 |
| 144 | 52 | 13 | 36 |
Hand drawing instead
Prefer to draw the curves yourself and have them mirrored around a centre? Try the free mandala maker on mecmua.cihat.dev.
Related tools
Questions people ask
How does a spirograph work?
A toothed wheel rolls around the inside or outside of a toothed ring while a pen in one of the wheel’s holes draws. The ratio of teeth decides how many loops the curve has; the hole decides how deep they are.
What are hypotrochoids and epitrochoids?
The curves a point on a rolling circle traces when the circle rolls inside (hypotrochoid) or outside (epitrochoid) another circle. Spirograph drawings are these curves.
Why does my drawing look simple?
The ring and wheel share a large common factor, so the curve closes after a few trips. Change the wheel by one tooth and it will usually draw many more loops.
Can I plot or engrave the drawing?
Yes. The SVG is a single continuous path per layer, which suits pen plotters, laser engravers and vinyl cutters.
Is this the Spirograph toy?
No. Spirograph is a trademark of its owner. This page is an independent drawing tool that uses the same geometry.
