Skip to content
MachineCalcs

Compression Spring Calculator

Spring rate, solid height, Wahl-corrected stress and a buckling check — with built-in material data. Metric and imperial. Free, no signup.

Inputs

mm
mm
mm
mm

Results

Spring rate(k)
1.239 N/mm

Spring index(C)
10

Solid height
10 mm

Wahl factor(Kᵥᵥ)
1.145

Corrected shear stress(τ)
361.2 MPa

Within allowable.

Allowable shear stress
995 MPa

Static limit at this wire size.

Buckling (slenderness L₀/D)
4

Stable at any deflection.

Force at deflection(F)
12.39 N

2.786 lbf

At the deflection entered above.

Max travel to solid
30 mm

0102030400102030operatingDeflection (mm)Force (N)
  • Static load; ignores fatigue, set and stress relaxation.
  • Allowable shear stress is the static torsional limit at this wire size (45% of estimated tensile strength), before set removal.
  • Buckling assumes the ends are seated between parallel flat surfaces.

How it works

The spring rate is k = G·d⁴ / (8·D³·Nₐ), where G is the material shear modulus, d the wire diameter, D the mean coil diameter and Nₐ the active coil count. A thicker wire or a smaller coil makes the spring much stiffer — the wire diameter enters to the fourth power and the coil diameter to the third.

Shear stress is corrected for coil curvature with the Wahl factor Kᵥᵥ = (4C−1)/(4C−4) + 0.615/C, where C = D/d is the spring index. The corrected stress at a load F is τ = Kᵥᵥ · 8·F·D / (π·d³) and it is compared against the material’s maximum allowable static torsional stress. That allowable is a fraction of the tensile strength, and tensile strength is itself size-dependent — Sᵤₜ(d) = A / d^m — so the same material allows a higher stress in thinner wire.

Solid height comes from the total coils and wire diameter (the end type sets how many inactive coils there are), and a buckling check compares the effective slenderness α·L₀/D against the critical value, assuming the ends are seated between parallel flat surfaces. Formulas follow standard spring-design practice (e.g. Shigley, Mechanical Engineering Design, chapter 10).

Worked example

Music wire, d = 1.0 mm, mean coil D = 10 mm (so the spring index C = 10), Nₐ = 8 active coils, free length L₀ = 40 mm, closed & ground ends. With G = 79.3 GPa the rate is k ≈ 1.24 N/mm. At 10 mm of deflection the force is F ≈ 12.4 N. The Wahl factor is Kᵥᵥ ≈ 1.14, giving a corrected shear stress of τ ≈ 361 MPa — comfortably below the ≈ 995 MPa allowable for 1 mm music wire. The solid height is 10 mm, leaving 30 mm of travel, and the slenderness L₀/D = 4 is within the no-buckling region for ground ends. Those are exactly the numbers the calculator shows when you load this page.

Spring material data

Shear modulus G, Young’s modulus E and the maximum allowable static stress for common spring materials. The calculator uses these automatically when you pick a material; the table is here so you can audit the source.

Typical design values for cold-wound compression-spring wire.
Material Standard G — GPa (Mpsi) E — GPa Max static τ Notes
Music wire ASTM A228 79.3 (11.5) 207 45% of Sᵤₜ Highest tensile strength; best for small-diameter springs.
Oil-tempered ASTM A229 77.2 (11.2) 207 50% of Sᵤₜ General-purpose; not for shock or fatigue service.
Hard-drawn ASTM A227 77.2 (11.2) 207 45% of Sᵤₜ Lowest cost; general-purpose static service.
Chrome silicon ASTM A401 77.2 (11.2) 207 50% of Sᵤₜ High stress; shock, fatigue and moderately elevated temperature.
Chrome vanadium ASTM A232 77.2 (11.2) 207 50% of Sᵤₜ Shock loads and moderately elevated temperature.
Stainless 302/304 ASTM A313 69 (10) 193 35% of Sᵤₜ Corrosion resistant; lower shear modulus and allowable stress.

Source: Standard spring-design references (Shigley, Mechanical Engineering Design, Tables 10-4/10-5/10-6; ASTM wire standards). Verify against the governing standard and supplier data for production design.

Allowable stress is shown as a fraction of tensile strength because tensile strength varies with wire diameter: Sᵤₜ(d) = A / d^m. The calculator evaluates that at your wire size, so a 0.5 mm music wire is treated as stronger than a 5 mm one.

Frequently asked questions

How do I calculate the spring rate of a compression spring?
Use k = G·d⁴/(8·D³·Nₐ), where G is the shear modulus, d the wire diameter, D the mean coil diameter and Nₐ the active coils. Enter those above and the calculator solves it. Spring rate formula explained →
What is the Wahl correction factor and do I need it?
It corrects the shear stress for the extra stress on the inner coil surface caused by curvature: Kᵥᵥ = (4C−1)/(4C−4) + 0.615/C, where C = D/d. Use it for any real spring — skipping it under-predicts the peak stress. The Wahl correction factor →
Will my spring buckle?
A compression spring buckles when it is too slender for its deflection. The calculator flags it from the free length, mean coil diameter and end type using the standard slenderness criterion (effective slenderness α·L₀/D), assuming the ends seat between parallel flat surfaces.
What spring index should I use?
The spring index C = D/d is best kept between about 4 and 12. Below 4 the wire is hard to coil and over-stressed; above 12 the spring tangles and is fragile. The calculator warns outside that range.
How is the allowable stress determined?
It is the maximum allowable static torsional stress, taken as a fraction of the wire’s tensile strength — and tensile strength itself depends on wire diameter (Sut = A/d^m, so thinner wire is stronger). The calculator uses the selected material’s coefficients, not a single fixed number.
Does this work in metric and imperial?
Yes — toggle SI/Imperial in the header and every input and result converts. Copy a link to share your exact configuration.

Method & assumptions

  • Static loading only — fatigue, set and stress relaxation are not modelled.
  • The allowable stress is the static torsional limit before set removal; shot-peened or set-removed springs tolerate more.
  • The buckling check assumes the ends are seated between parallel flat surfaces (end-fixity α = 0.5 for ground ends).
  • Material constants are typical published values; for a safety-critical design, verify against the governing standard and your supplier’s certified data, and have a professional engineer review it.

Related calculators