Compression Spring Calculator

Spring rate · Wahl/Bergsträsser stress · Goodman fatigue · Buckling SF · Surge SF · Set risk · Energy stored — SMI / IS 7906.

⚙️ Compression Spring Calculator

📖 What is a Compression Spring Calculator?

A compression spring calculator applies the standard helical spring equations — as codified by the Spring Manufacturers Institute (SMI), the Indian Standard IS 7906, and EN 13906-1 (and drawing on Shigley's Mechanical Engineering Design) — to determine the full mechanical performance of a coil compression spring from its geometry and material. Engineers use it during spring design to verify spring rate, working stress, fatigue life, solid height clearance, buckling safety, resonance margin, permanent set risk, and energy storage before ordering or manufacturing.

This calculator covers the complete SMI/Shigley design workflow. From geometry inputs (wire diameter, coil diameter, free length, active coils, end type) and material selection, it computes: spring rate, forces at preload and working deflection, spring index, Wahl or Bergsträsser corrected shear stress, mean and alternating stress, modified Goodman fatigue safety factor, critical buckling load with safety factor, surge resonance safety factor, permanent set risk, energy stored, dynamic inertia force, coil pitch validity, installed-length lateral stability, wire mass, and natural frequency.

The stress correction factor is critical — in a helical spring the wire is curved, not straight, and bears a direct shear component in addition to torsional shear. This calculator supports both the classic Wahl factor (Kw) and the Bergsträsser factor (Kb), which is used by EN 13906 and DIN 2089 and is considered marginally more accurate for low spring index values (C < 6). The two factors agree to within 1–2% for C > 6. Without stress correction, springs are systematically under-designed and fail prematurely in service.

The Goodman fatigue assessment treats the spring as a variable-amplitude component cycling between a preload (installed) stress and a working (maximum) stress. The modified Goodman criterion compares the mean-plus-alternating stress combination against the material's endurance limit and ultimate shear strength. A safety factor above 1.3 is acceptable for static or low-cycle use; safety factors above 1.5–2.0 are recommended for high-cycle dynamic applications such as engine valve springs or actuator return springs.

Ten spring materials are available — from common hard-drawn steel wire and music wire through chrome-vanadium, chrome-silicon, two grades of stainless steel, 17-7 PH precipitation-hardened stainless, phosphor bronze, beryllium copper, and Inconel 718 for high-temperature service. Each material has a characteristic shear modulus G, density, and allowable stress fraction of UTS derived from long-service SMI and IS material data.

The calculator is intended for preliminary design and educational use. For safety-critical or dynamic applications — valve springs, suspension springs, aerospace mechanisms — always validate results against the applicable design code and engage a qualified mechanical engineer.

📝 Compression Spring Formulas

Spring Rate (Stiffness):
k = (G × d⁴) / (8 × D³ × Na)
G = shear modulus (MPa) | d = wire dia (mm) | D = mean coil dia (mm) | Na = active coils

Total Coils from End Type:
Nt = Na + 2 (closed/ground or closed unground) | Nt = Na (open) | Nt = Na + 4 (double-closed)

Spring Force at Deflection x:
F = k × x

Spring Index:
C = D / d   Valid range: 4 ≤ C ≤ 12

Wahl Correction Factor:
Kw = (4C − 1) / (4C − 4) + 0.615 / C

Corrected Shear Stress (Wahl):
τ = (8 × F × D) / (π × d³) × Kw   [MPa when F in N, D & d in mm]

Solid Height:
Ls = Nt × d

Clash Allowance:
CA% = (x_max − x₂) / x_max × 100   x_max = L0 − Ls

Wire Mass:
m = ρ × π/4 × d² × π × D × Nt × 10⁻⁶   [kg; ρ in kg/m³, d and D in mm]

Natural Frequency (lowest axial mode):
fn = (d / (2π × D² × Na)) × sqrt(G / (2ρ)) × 1000   [Hz; G in MPa, ρ in kg/m³]

Modified Goodman Fatigue Safety Factor:
τ_mean = (τ₂ + τ₁) / 2   τ_alt = (τ₂ − τ₁) / 2
SF = 1 / (τ_alt / S_e + τ_mean / S_us)
S_e ≈ 0.40 × UTS (torsional endurance limit for steel)
S_us ≈ 0.65 × UTS (ultimate shear strength)

Slenderness Ratio (Buckling) — SMI limits per end condition:
SR = L0 / D   Both ends fixed: SR < 4 | One end fixed: SR < 2.6 | Both ends free: SR < 2

Bergsträsser Stress Correction (alternative to Wahl):
K_b = (4C + 2) / (4C − 3)   More accurate for inner-fibre curvature stress; K_b ≈ K_w for C > 6

Coil Pitch:
p = (L0 − inactive_coil_height) / Na   Must be > d to prevent coil clash at sub-solid deflection

Installed-Length Lateral Stability:
L_i = L0 − x₁   If L_i / D > 2.63 → lateral bow likely during compression; guide rod recommended

Surge (Resonance) Safety Factor:
SF_surge = f_n / f_operating   Minimum recommended: 13× (SMI); 20× for valve springs

Permanent Set Risk:
τ_max / UTS < 0.45 → LOW | 0.45–0.50 → MEDIUM | > 0.50 → HIGH

Energy Stored:
U = ½ × k × x₂²   [N·mm → divide by 1000 for joules]

Dynamic Inertia Force (high-speed springs):
F_dyn = (m_spring / 3) × (2π × f_op)² × x₂   [Factor 1/3: distributed spring mass per Shigley §10]

Estimated Fatigue Life (Basquin / S-N approximation):
N = 10⁶ × (S_e / τ_alt)⁵   [cycles; exponent b = 5 for spring steel per SMI / Shigley]
If τ_alt < S_e → life is theoretically infinite (below endurance limit)
Life categories: <10³ = very low | 10³–10⁵ = limited | 10⁵–10⁶ = moderate | >10⁶ = long / infinite

✍️ How to Use This Calculator

1
Enter wire diameter d (cross-section of the wire) and mean coil diameter D (average of OD and ID: D = OD − d = ID + d).
2
Enter the free length L₀ — the unloaded natural length of the spring.
3
Enter active coils Na and select the end type. Total coils Nt are derived automatically (closed/ground: Na+2, open: Na, double-closed: Na+4).
4
Enter preload deflection x₁ (installed position; use 0 for static-only) and working deflection x₂ (maximum service deflection).
5
Select the material. Shear modulus, density, and allowable stress are applied automatically.
6
Click Calculate Spring. Check stress PASS/FAIL, fatigue safety factor (aim > 1.3), clash allowance (aim > 15%), and any spring index or buckling warnings.
7
Use the charts — force-deflection curve, stress safety bar, and spring geometry diagram — to visually verify the design.

📄 Example Calculations

Example 1 — General-purpose hard-drawn steel spring

1
Inputs: d = 2.5 mm, D = 20 mm, L₀ = 80 mm, Na = 8, closed/ground ends (Nt = 10), x₁ = 10 mm, x₂ = 25 mm, Hard-drawn steel (G = 79,300 MPa, UTS = 1480 MPa)
2
Spring index & rate: C = 20 / 2.5 = 8.0 ✓  |  k = (79,300 × 2.5⁴) / (8 × 20³ × 8) = 6.05 N/mm
3
Forces: F₁ = 6.05 × 10 = 60.5 N  |  F₂ = 6.05 × 25 = 151.3 N
4
Wahl factor & stress: Kw = (31/28) + 0.615/8 = 1.184  |  τ₁ = 233.4 MPa, τ₂ = 583.5 MPa  |  Allowable = 0.45 × 1480 = 666 MPa → PASS
5
Goodman fatigue: τ_mean = 408.5 MPa, τ_alt = 175.1 MPa, S_e = 592 MPa, S_us = 962 MPa  →  SF = 1 / (0.296 + 0.425) = 1.39 — Fatigue OK
Ls = 25 mm  |  Clash allowance = 54.5% ✓  |  SR = 80/20 = 4.0 (borderline — consider guiding)

Example 2 — Chrome-vanadium valve spring (high-cycle fatigue)

1
Inputs: d = 3.0 mm, D = 18 mm, L₀ = 60 mm, Na = 6, closed/ground ends (Nt = 8), x₁ = 8 mm, x₂ = 20 mm, Chrome-vanadium (G = 80,000 MPa, UTS = 1720 MPa)
2
Spring index & rate: C = 18 / 3 = 6.0 ✓  |  k = (80,000 × 81) / (8 × 5832 × 6) = 23.15 N/mm
3
Forces: F₁ = 185.2 N  |  F₂ = 463.0 N
4
Wahl factor & stress: Kw = (23/20) + 0.615/6 = 1.253  |  τ₁ = 296.5 MPa, τ₂ = 741.2 MPa  |  Allowable = 0.52 × 1720 = 894.4 MPa → PASS
5
Goodman fatigue: τ_mean = 518.9 MPa, τ_alt = 222.4 MPa, S_e = 688 MPa, S_us = 1118 MPa  →  SF = 1 / (0.323 + 0.464) = 1.27 — Borderline (consider increasing wire diameter for high-cycle use)
Ls = 24 mm  |  Clash allowance = 44.4% ✓  |  SR = 60/18 = 3.33 ✓

❓ Frequently Asked Questions

What is the Wahl correction factor and why is it important? +
The Wahl correction factor (Kw) accounts for two stress-raising effects ignored by the simple torsion formula: the curvature of the wire wrapped around the coil, and the direct transverse shear component. It is defined as Kw = (4C−1)/(4C−4) + 0.615/C where C is the spring index D/d. For a spring index of 6, Kw ≈ 1.25, meaning actual stress is 25% higher than the naive calculation. Ignoring Kw leads to under-designed springs that fail prematurely.
How is fatigue life estimated for a compression spring? +
Fatigue life is assessed using the modified Goodman diagram, which relates mean stress and alternating stress to the material's ultimate tensile strength. For a spring cycling between a preload F1 (installed load) and a working load F2, the mean stress τ_mean = (τ2 + τ1)/2 and alternating stress τ_alt = (τ2 − τ1)/2. The Goodman safety factor SF = 1 / (τ_alt / S_e + τ_mean / S_us) where S_e is the endurance limit (≈ 0.4 × UTS for steel in torsion) and S_us is the ultimate shear strength (≈ 0.65 × UTS). SF > 1.3 is typically acceptable for non-critical applications.
What is spring index and why does it matter? +
Spring index C = D/d is the ratio of mean coil diameter to wire diameter. It controls stress concentration, manufacturability, and stability. Low C (below 4) means the wire is tightly coiled and experiences very high curvature stresses; it is also difficult to form consistently. High C (above 12) produces a flimsy spring that is prone to lateral buckling and tangling during manufacture. The optimal range for most compression springs is C = 6 to 9, which balances stress, fatigue life, and ease of production.
How do I check if my spring will buckle laterally? +
Lateral buckling risk is assessed by the slenderness ratio L0/D. For springs with both ends on flat parallel surfaces: buckling occurs when L0/D exceeds about 4. For one free end: the threshold drops to about 2.6. This calculator flags a warning when SR > 4. To prevent buckling, reduce the free length, increase the mean coil diameter, or guide the spring on a central rod or inside a bore. Guided springs can tolerate slenderness ratios up to about 8–10.
What is solid height and what clash allowance should I use? +
Solid height Ls = Nt × d is the spring length when all coils touch. In service the spring must never reach solid height — coil clash generates impact loads that cause rapid fatigue failure. A minimum clash allowance (the gap between maximum working deflection and solid height) of 15% of the total available deflection is standard per SMI guidelines. For high-cycle fatigue applications such as engine valve springs, use 25–30% clash allowance.
What end types are available and how do they affect solid height? +
Closed-and-ground ends (most common): Nt = Na + 2, provides flat seating and uniform axial load. Closed unground: also Nt = Na + 2, lower cost but slight off-axis loading. Open ends: Nt = Na, cheapest but poor seating and springs can tangle. Double-closed: Nt = Na + 4, used in precision instruments. End type directly affects solid height (Ls = Nt × d) — adding inactive end coils increases Ls and reduces available deflection to solid.
How many cycles can a compression spring last — and how is fatigue life estimated? +
Spring fatigue life is the number of load cycles the spring survives before a crack initiates and propagates to failure. Most compression spring failures are fatigue failures, not static overload. Life is estimated using the Basquin S-N relationship adapted for spring steel: N = 10⁶ × (S_e / τ_alt)⁵, where S_e is the torsional endurance limit and τ_alt is the alternating shear stress. If τ_alt falls below S_e the spring is theoretically at infinite life — this is the design target for high-cycle applications. Practical life categories: below 10³ cycles is very low life (static or rare actuation only); 10³–10⁵ is limited life; 10⁵–10⁶ is moderate; above 10⁶ is long life or infinite. The Goodman safety factor gives a complementary view: SF below 1.2 implies short life, 1.2–1.5 implies moderate, above 1.5 targets infinite life. Real service life is reduced by corrosion, surface damage, high temperature, resonance, and side loading — always apply a further service factor for critical applications.
What is the difference between Wahl and Bergsträsser stress correction factors? +
Both factors correct the basic torsion formula for curvature and direct shear, but they use slightly different derivations. The Wahl factor is Kw = (4C−1)/(4C−4) + 0.615/C and has been the industry standard since 1929. The Bergsträsser factor is Kb = (4C+2)/(4C−3) and is derived from a more rigorous curved-beam analysis of the inner-fibre stress. For spring index C above 6 the two factors differ by less than 1–2%; below C = 4 the Bergsträsser factor predicts slightly higher stress and is considered more conservative and accurate. EN 13906 and DIN 2089 use the Bergsträsser form. Either is acceptable for most design work — the uncertainty in material properties exceeds the difference between them.
What is spring surge and how do I avoid resonance? +
A helical spring behaves like a mechanical waveguide. If the excitation frequency from the machine matches the spring's natural frequency, standing stress waves build up inside the coils, amplifying peak stress far beyond the static working stress and causing rapid fatigue failure — this is called surge. The surge safety factor is SF_surge = fn / f_operating. SMI recommends SF_surge ≥ 13 for general service and ≥ 20 for engine valve springs. To increase natural frequency: reduce active coils Na, reduce coil diameter D, increase wire diameter d, or use a denser/stiffer material. Shot peening also helps by improving fatigue resistance for springs that must run close to resonance.
How do I prevent permanent set (spring relaxation)? +
Permanent set occurs when peak shear stress exceeds the material's elastic limit. In practice this starts when τ_max approaches about 45–50% of UTS. Springs that take permanent set lose their free length and spring rate over time, degrading the mechanism they are part of. To prevent set: choose a material with higher UTS for the given wire diameter, reduce working deflection x₂, or use a larger wire diameter d to distribute stress over more cross-section. Presetting — intentionally compressing a new spring to solid height several times — introduces favourable residual stress and can improve set resistance by 10–20%. Shot peening provides a similar but larger benefit for high-cycle applications.
How is the critical buckling load calculated for a compression spring? +
Spring buckling is assessed by the slenderness ratio SR = L0/D — the ratio of free length to mean coil diameter. SMI does not rely on a critical-load formula for this check; instead it uses empirically validated SR limits per end condition: SR < 4 for both ends fixed or guided, SR < 2.6 for one end fixed and one free, and SR < 2 for both ends unguided (pivoting). This calculator rates buckling risk as LOW (SR < 75% of the limit), MODERATE (75–100% of the limit), or HIGH (SR exceeds the limit). When the risk is MODERATE or HIGH, guide the spring on a rod or in a bore — guided springs can safely operate at SR values of 8–10 or more.

📌 Quick Tips

💡Spring index C = D/d should be 4–12. Below 4: high coiling stress, manufacturing difficulty. Above 12: unstable, prone to buckling and tangling.
💡Always maintain a clash allowance ≥ 15% of x_max between working deflection and solid height. Coil clash causes rapid fatigue failure.
💡For fatigue applications, use shot-peened wire — it roughly doubles fatigue life by inducing compressive residual stress on the wire surface.
💡Natural frequency matters for dynamic systems. Keep the operating frequency below 1/13th of the spring's natural frequency to avoid resonance (surge).
💡Check permanent set risk: if τ_max > 45% of UTS, the spring may relax over time. Preset the spring (compress to solid 3–5 times) to introduce beneficial residual stress.
💡For long springs (SR = L0/D > 4 with fixed ends), always guide on a rod or in a bore. Guided springs can safely operate at SR values up to 8–10.