Home / Articles / Calculate and draw a compression coil spring
Draw + calculate · Production

Calculate and draw a compression coil spring

8 min read · updated 15 Nov 2026

A compression coil spring looks hard but is controlled by only a few values: the wire d, the diameter, the pitch p, the number of coils and the end style. Once you know these you can work out the mean diameter, spring index, active coils, solid length and helix angle, then draw the side view in DXCAD2D Online to send out or to order coiled. This guide gives the formulas, the end-style table, a worked example and the drawing steps.

The key values of a coil spring

Start with the three diameters, which are always linked through the wire size d.

Mean Ø: Dm = OD − d = ID + d  |  Inside Ø: ID = OD − 2d  |  Spring index: C = Dm ÷ d (keep it 4–12, best 5–9)

The spring index C tells you whether a spring is "fat or thin". Below 4 it is hard to coil and highly stressed; above 12 it is loose and buckles easily.

OD L0 p d
Spring side view: OD is the outside Ø · p is the pitch (centre to centre of the wire for one coil) · L0 is the free length · d is the wire size.

End styles and the length formulas

The end style sets how many of the counted coils (Nt total) actually work (Na) and how long the spring is when fully compressed (Ls). These are the standard formulas.

End styleActive coils NaSolid length LsFree length L0
PlainNtd(Nt + 1)p·Na + d
Plain and groundNt − 1d·Ntp(Na + 1)
Squared (closed)Nt − 2d(Nt + 1)p·Na + 3d
Squared and groundNt − 2d·Ntp·Na + 2d

The most common style in machine work is squared and ground, because it stands up straight and spreads the load evenly.

Worked example: a squared-and-ground spring

Wire d = 2.0 mm, OD = 16 mm, counted Nt = 8 coils, free length L0 = 40 mm, squared and ground.

FindFormulaSubstituteResult
Mean ØDm = OD − d16 − 214 mm
Inside ØID = OD − 2d16 − 412 mm
Spring indexC = Dm ÷ d14 ÷ 27 (in the good band)
Active coilsNa = Nt − 28 − 26 coils
Solid lengthLs = d·Nt2 × 816 mm
Pitchp = (L0 − 2d) ÷ Na(40 − 4) ÷ 66 mm
Helix angleλ = atan(p ÷ (π·Dm))atan(6 ÷ 43.98)7.77°
Max deflection to solidL0 − Ls40 − 1624 mm
Approx wire length≈ π·Dm·Ntπ × 14 × 8≈ 352 mm
Want the spring rate? k = G·d⁴ ÷ (8·Dm³·Na). For music wire G ≈ 79.3 GPa, k = 79300 × 2⁴ ÷ (8 × 14³ × 6) ≈ 9.6 N/mm, so 24 mm of deflection needs about 231 N (approximate — depends on the real material).

Try it right now — a free 2D CAD in your browser. Nothing to install, no sign-up.

Open DXCAD2D Online

Drawing the spring side view in DXCAD2D Online

  1. Press L for a horizontal centreline, then offset up and down by OD ÷ 2 = 8 mm each side to get the Ø16 envelope.
  2. Divide the axis into pitch steps of p = 6 mm with array (or repeated offset) to set each coil position along the L0 = 40 mm length.
  3. Press P and draw the wire as a zig-zag alternating top–bottom between the envelope at every half-pitch, then offset the wire line by 2 mm (the d size) to show its thickness.
  4. Draw both ends closed and ground flat (squared and ground); use mirror so the two ends match.
  5. Press M to check L0 = 40 mm and Ls = 16 mm, then D to dimension OD, ID, d, p, L0 and the coil count.
Tip: a spring coiler needs d, OD (or Dm), the total coils Nt, L0 and the end style. Put all of these on the drawing and it can be coiled correctly without any back-and-forth.

Frequently asked questions

How do I find the mean diameter of a spring

Dm = OD − d (or ID + d), e.g. OD 16 mm with 2 mm wire gives a mean Ø of 14 mm. It is the diameter used for the spring index and the rate.

What spring index should I use

C = Dm ÷ d should sit in the 4–12 range, best 5–9. Below 4 it is hard to coil and highly stressed; above 12 it is loose and buckles easily.

What is the difference between total and active coils

Total coils Nt is everything you can count; active coils Na is the coils that actually flex. Squared-and-ground ends give Na = Nt − 2 because the two end coils do not carry load.

What is solid length

The length when the spring is fully compressed and the wire touches. For squared and ground, Ls = d·Nt, e.g. 2 mm wire × 8 coils = 16 mm. The spring can deflect at most L0 − Ls.

How do I calculate spring pitch

For squared and ground, p = (L0 − 2d) ÷ Na, e.g. L0 40, d 2, Na 6 gives p = 36 ÷ 6 = 6 mm.

Summary

A compression coil spring comes down to a few values: Dm = OD − d, index C = Dm/d, active coils Na set by the end style, and solid length and pitch from the formula table. Our 2 mm wire, OD 16 mm, 8-coil squared-and-ground example gives Dm 14, C 7, Na 6, Ls 16, p 6 mm and 24 mm of travel. With the numbers in hand, draw the side view in DXCAD2D Online using offset, array, polyline and mirror — ready for the coiler.