Compression Spring Design: Formulas and a Step-by-Step Example

Author: Jenny Xu

Published: Nov 19, 2026

Updated: Nov 19, 2026

Designing a compression spring means finding a wire diameter, coil diameter and number of coils that give the right force at the right lengths, fit the space and keep the wire stress safe. Most designs start from two load points and follow the same steps. The example below goes from 50 N at 30 mm and 120 N at 20 mm to a finished spring in three tries.

What you need before you start

  • Two load points: the force at the installed length and at the shortest working length
  • The space: the bore the spring sits in, the rod it slides over, or both
  • Static or cyclic duty, and the cycle count if it cycles
  • Temperature and environment, which decide the material

The compression spring formulas

QuantityFormula
Spring ratek = (F₂ − F₁) / (L₁ − L₂)
Free lengthL₀ = L₁ + F₁ / k
Spring indexC = D / d
Wahl factorK_w = (4C − 1) / (4C − 4) + 0.615 / C
Shear stressτ = K_w·8·F·D / (π·d³)
Active coilsNₐ = G·d⁴ / (8·D³·k)

D is the mean coil diameter (outside diameter minus d), d the wire diameter and G the shear modulus: 81.7 GPa for music wire, about 79 GPa for other carbon spring steels and 69 GPa for 302 stainless. Where the rate formula comes from is explained in the spring constant guide.

Step 1: rate and free length from the load points

k = (120 − 50) / (30 − 20) = 7 N/mm. To give 50 N at 30 mm the spring must be 50 / 7 = 7.1 mm longer than 30 mm when free, so L₀ = 37.1 mm. At the 20 mm working length it is deflected 17.1 mm.

Step 2: choose the spring index

The spring index C = D/d decides how easy the spring is to make and how high the stress runs at the inside of the coil. Values from about 4 to 12 are practical, and 6 to 9 is easiest to coil and hold to tolerance. Below 4 the wire is hard to form and the inner-fibre stress climbs; above 12 springs tangle and their diameter is harder to hold.

Step 3: end type, total coils and solid height

End typeTotal coils N_tSolid height L_sFree length L₀
PlainNₐd·(N_t + 1)p·Nₐ + d
Plain and groundNₐ + 1d·N_tp·(Nₐ + 1)
Closed (squared)Nₐ + 2d·(N_t + 1)p·Nₐ + 3d
Closed and groundNₐ + 2d·N_tp·Nₐ + 2d

p is the pitch of the active coils. Closed and ground ends stand square and spread the load evenly, so they are the usual choice for precision and heavier springs.

Step 4: the worked example in three tries

The spring sits in a 24 mm bore, so the outside diameter should stay at about 21 mm or less. The material is music wire (ASTM A228, G = 81,700 N/mm²) with closed and ground ends. For each try, work out the active coils, add two end coils, compare the solid height with the 20 mm working length, then check the stress at 120 N and at solid.

Tryd (mm)D (mm)CNₐSolid heightStress at 120 NStress at solidResult
12.0126.013.531.0 mm574 N/mm²—Solid height is longer than the 20 mm working length
22.0189.04.012.0 mm799 N/mm²1,172 N/mm²Takes a set if it is ever compressed solid
32.2188.25.917.3 mm609 N/mm²706 N/mm²Fits and is safe at solid

Try 1 needs 13.5 active coils, which stack to 31 mm when solid, longer than the 20 mm working length, so it cannot work. Try 2 opens the coil to 18 mm. That cuts the coils to 4 and the solid height to 12 mm, but the wire is now too highly stressed: compressed solid it would see 1,172 N/mm². A common static limit for music wire is about 45% of tensile strength, roughly 900 N/mm² for 2 mm wire, so this spring would shorten permanently if it ever went solid. Try 3 thickens the wire to 2.2 mm. It needs 5.9 active coils, reaches solid at 17.3 mm and stays at 706 N/mm² even when solid, below its limit of about 887 N/mm².

The finished design:

  • Wire: 2.2 mm music wire; mean diameter 18 mm, outside diameter 20.2 mm
  • Coils: 5.9 active, 7.9 total, closed and ground ends
  • Free length 37.1 mm; pitch about (37.1 − 2 × 2.2) / 5.9 = 5.6 mm
  • Rate 7.0 N/mm: 50 N at 30 mm and 120 N at 20 mm
  • Solid height 17.3 mm maximum, leaving 2.7 mm, about 16% of the travel, before the coils touch

Step 5: check clearance, buckling and diameter growth

  • Keep at least about 10% to 15% of the total deflection between the shortest working length and solid height, because the rate climbs once coils start to touch.
  • Compare free length with mean diameter. At 37.1 / 18 ≈ 2.1 this spring is stable even with pivoted ends. A steel spring is always stable below L₀/D ≈ 2.63 with pivoted ends or 5.26 between fixed flat plates; above that, check it for the real end conditions or guide it on a rod or in a bore. See compression spring buckling.
  • The outside diameter grows slightly as the spring is compressed, so leave clearance in the bore, and between the inside diameter and any rod.
  • For cyclic duty, check the stress range against fatigue data (see spring fatigue life) and consider shot peening; see shot peening and fatigue life.

Helical, coil or compression spring?

A helical spring is any spring wound as a helix. Compression, extension and torsion springs are all helical springs and are often called coil springs; the load tells them apart. Compression springs are pushed, extension springs are pulled and torsion springs are twisted, which needs the different formulas in the torsion spring formula guide. The types of springs guide compares the families.

What to send for a quote

Send the two load points with tolerances, the space limits, end type, material, finish and cycle life. State the loads at lengths and give the rate as a reference, because a spring maker adjusts the coils and free length to hit the loads. Wanjin cold-coils compression springs from 0.1–10 mm wire and hot-coils heavy duty springs from 14–50 mm bar. The spring rate calculator checks rate, stress and solid height for a draft design, and you can send your drawing for review.

Key Takeaways

  • Start from two load points: k = (F₂ − F₁) / (L₁ − L₂), then L₀ = L₁ + F₁ / k.
  • Keep the spring index C = D/d between about 4 and 12, ideally 6 to 9.
  • Active coils Nₐ = G·d⁴ / (8·D³·k); add end coils and check solid height against the shortest working length.
  • Check Wahl-corrected stress at the working load and at solid; about 45% of tensile strength is a common static limit for music wire.

Frequently Asked Questions

What is the spring index of a compression spring?

The ratio of mean coil diameter to wire diameter, C = D/d. Values from about 4 to 12 can be made, and 6 to 9 is easiest to coil accurately. Low indexes raise the stress at the inside of the coil; high indexes give springs that tangle and vary more in diameter.

How do you calculate the free length of a spring?

From one load point and the rate: L₀ = L₁ + F₁ / k, where F₁ is the force at the installed length L₁. A spring that must give 50 N at 30 mm with a rate of 7 N/mm needs a free length of 30 + 50 / 7 = 37.1 mm.

What is the Wahl correction factor?

A factor that adds the extra stress at the inside of the coil caused by its curvature and by direct shear: K_w = (4C − 1) / (4C − 4) + 0.615 / C. At C = 6 it is 1.25, so the real stress is 25% above the uncorrected value.

Is a helical spring the same as a coil spring?

Yes, in everyday use. Both mean a spring wound as a helix, which covers compression, extension and torsion springs; the direction of the load tells them apart.

Related spring types

Related Posts

Tags