Reference & calculator Machine elements ~7 min read
Size or check a helical spring

Compression spring calculator: spring rate, stress and solid height

Published November 10, 2026 — spring rate, stress corrected with the Wahl factor, coils and solid height by end type, buckling, the shear moduli of common spring wires, two worked examples (in mm and inches) and a calculator.

G·d⁴/8D³n The spring rate k
C = D/d The index, 4 to 12
L₀/D < 5,26 No buckling (flat ends)

In short: a compression spring's rate is k = G·d⁴ / (8·D³·n): G shear modulus of the wire, d wire diameter, D mean diameter (outside diameter minus d), n active coils. Wire stress is τ = K·8·F·D / (π·d³), K being the Wahl factor. Doubling the wire diameter multiplies the rate by 16; doubling the coil diameter divides it by 8.

1. Compression spring calculator

Enter the wire diameter, the outside diameter, the active coils and the end type. Free length and working deflection are optional: they give the force, the stress and the margin before going solid.

Spring rate k
—
Index C and Wahl factor K
—
Force and stress at deflection
—
Total coils and solid height
—
Force and stress at solid
—
Slenderness L₀/D
—

Default values: 2 mm music wire, 18 mm outside diameter (D = 16 mm), 8 active coils, squared and ground ends, 40 mm free length: rate 4.84 N/mm, 48.4 N and 292 MPa at 10 mm deflection, 20 mm solid height. The details are in the worked examples.

2. Formulas: rate, stress, index

Cylindrical helical spring in round wire, constant pitch, linear characteristic. All formulas use the mean diameter D = outside diameter − d = inside diameter + d.

QuantityFormulaNote
Spring rate kG·d4 / (8·D3·n)N/mm with N, mm, MPa; lbf/in with lbf, in, psi
Force Fk·ss: compression from the free length
Spring index CD / d4 to 12 preferably: below, hard to coil; above, a floppy spring that tangles
Wahl factor K(4C − 1) / (4C − 4) + 0.615 / Ccorrects for wire curvature and direct shear
Shear stress τK·8·F·D / (π·d3)highest on the inside of the coil
Pitch p (squared and ground)(L0 − 2·d) / nsee the end type table
pdDD + dL₀inactive coil
The dimensions of a compression spring: wire diameter d, mean diameter D (the one in the formulas), outside diameter D + d, pitch p and free length L₀. The squared end coils rest on the seats and do not count in the active coils n.

3. End types, coils and solid height

The end type sets the number of inactive coils, the solid height Ls and the relation between free length and pitch. n: active coils; nt: total coils.

End typeTotal coilsSolid heightFree length
Squared and groundn + 2d·ntp·n + 2·d
Squared (closed), not groundn + 2d·(nt + 1)p·n + 3·d
Plain and groundn + 1d·ntp·(n + 1)
Plainnd·(nt + 1)p·n + d

Squared and ground ends are the usual choice in machine design: the spring stands square on its seats and the load is better centred. In practice, the actual solid height is slightly above these theoretical values (wire tolerance, coils not touching perfectly): I recommend keeping a margin of 10 to 15% of the available travel before going solid.

4. Shear modulus of spring wires

It is the shear modulus G (modulus of rigidity), not Young's modulus E, that sets the rate. Typical published values for spring design; they vary by a few percent with the wire condition and temperature: the supplier's data sheet prevails.

WireG (106 psi)G (MPa)
Music wire, hard-drawn steel, carbon steel11.579 300
Chrome alloy steel (Cr-V, Cr-Si)11.277 200
Stainless 302, 304, 31610.068 900
Stainless 17-7 PH10.572 400
Phosphor bronze6.041 400
Beryllium copper7.048 300

Source of the psi values: PTC's modulus of rigidity table for compression springs (Windchill Risk and Reliability, accessed 10/11/2026); exact conversion, 1 psi = 6.894757 kPa.

5. Worked examples

Music wire spring (metric units)

  • Wire d = 2 mm, outside diameter 18 mm, so D = 16 mm and C = 8; 8 active coils; G = 79,300 MPa.
  • Rate: k = 79,300 × 2⁴ / (8 × 16³ × 8) = 4.84 N/mm.
  • Wahl factor: K = 31/28 + 0.615/8 = 1.184.
  • At 10 mm deflection: F = 48.4 N; τ = 1.184 × 8 × 48.4 × 16 / (π × 2³) = 292 MPa.
  • Squared and ground ends: 10 total coils, 20 mm solid height; with L₀ = 40 mm, the pitch is (40 − 4)/8 = 4.5 mm, and at solid the force would be 96.8 N for 584 MPa.

Small spring in inches (US units)

  • Wire d = 0.062 in, D = 0.500 in (C = 8.06), 10 active coils, music wire G = 11,500,000 psi.
  • Rate: k = 11,500,000 × 0.062⁴ / (8 × 0.5³ × 10) = 17.0 lbf/in.
  • At 0.25 in deflection: F = 4.25 lbf; K = 1.182; τ = 26,800 psi (185 MPa).

6. Checks: stress, buckling, fit

force F (N)deflection s (mm)F₁ = 48.4 Nsolid: 96.8 Nslope k = 4.84 N/mmL₀1020 = Ls
The characteristic of a linear spring: force rises by k per millimetre from the free length L₀. The working point F₁ must stay well before the solid height Ls, where force and stress are greatest: with the default values, 48.4 N at 10 mm and 96.8 N at solid.
  • Stress: compare τ with the wire's allowable stress from the supplier or the wire standard. For a static steel spring, it is in the order of 35 to 50% of the tensile strength depending on the material, more after presetting; under fatigue, it is markedly lower. Also check the stress at solid: if it stays allowable, the spring will not take a set even when fully compressed.
  • Buckling: a steel spring between two parallel flat plates stays stable as long as L₀/D is below about 5.26; if one end can tilt, the limit drops to about 2.63. Beyond that, guide it on a rod or in a bore, with clearance.
  • Fit: the outside diameter grows slightly under compression. Allow clearance in the bore, and around the guide rod on the inside diameter (D − d); spring catalogues give the minimum bore and maximum rod for each part number.
  • Several springs: in parallel (side by side), rates add up; in series (end to end), their inverses do: 1/k = 1/k₁ + 1/k₂.

These formulas cover the cylindrical, linear-rate spring in round wire. A conical spring, a variable-pitch spring, a rectangular-wire spring or one working hot needs a specific calculation, which spring manufacturers provide. To calculate the bending of a beam carrying the spring, see beam deflection.

Printable version: the compression spring formulas as a PDF (A4, no sign-up): formulas, end types and shear moduli.

7. FAQ

What is the spring rate formula for a compression spring?

k = G·d⁴ / (8·D³·n), with G the wire's shear modulus, d the wire diameter, D the mean coil diameter and n the number of active coils. In N, mm and MPa, k comes out in N/mm.

What is the difference between active and total coils?

The end coils resting on the seats do no work. With squared ends (ground or not), total coils equal active coils plus 2; only the active coils enter the rate calculation.

What is the Wahl factor?

A coefficient that corrects the wire's torsional stress for coil curvature and direct shear: K = (4C − 1)/(4C − 4) + 0.615/C, with C = D/d. For C = 8, K is 1.18: the actual stress is 18% higher than the uncorrected formula.

How do you calculate a spring's solid height?

For squared and ground ends, solid height is the wire diameter times the total number of coils; for squared ends that are not ground, count one more coil. The spring should not work down to solid.

When does a compression spring buckle?

A steel spring between two parallel plates stays stable if its free length is below about 5.26 times its mean diameter; if one end can tilt, the limit drops to about 2.63. Beyond that, guide it on a rod or in a bore.

Read next