Wire diameter d
Coil diameter you know
Outside diameter (OD)
Measured across the outside of the coil.
Free length L0
Working point as a
Working deflection
How far the spring is compressed from its free length.
Stress factor, set and end support
Bergstrasser and Wahl differ by about 1% for C from 4 to 12. With the set removed the stress uses the direct-shear factor and the allowable rises to 60-70% of tensile strength.
Your compression spring has a rate of about 9.99 lbf/in; at 2 in of deflection it pushes back with 20 lbf and goes solid at 0.964 in.
9.99 lbf/in
Spring rate k
1.75 N/mm
20 lbf
Force at working point
at 2 in, length 1.26 in
0.964 in
Solid height Ls
2.3 in of travel, 23 lbf at solid
10.5
Spring index C
in the 4 to 12 range
Design checks
Pass
Spring indexC = D / d = 10.5, inside the usual range of 4 to 12.
Pass
Active coilsNa = 10.05, inside the usual range of 3 to 15.
Pass
Stress at the working pointCorrected shear stress is 94.47 ksi, 32.7% of the wire’s estimated tensile strength (the limit used here is 45%). Safety factor 1.38.
Pass
Stress at solidAt solid the stress is 108.6 ksi, 37.5% of tensile strength (limit 45%). Safety factor 1.2, so it does not take a set if driven solid.
Pass
Coil bindWorking length 1.264 in is 0.3 in above solid height (0.964 in): 15% extra travel beyond the working deflection (at least 15% is recommended).
Pass
BucklingFree length 3.264 in is under the 4.252 in limit for both ends held flat, so the spring cannot buckle at any deflection.
Pass
Natural frequencyThe spring itself resonates at 159 Hz with both ends on plates (79.7 Hz with one end free). To avoid surge keep the cycling rate under 8 to 11 Hz (1/20 to 1/15 of it).
Force against deflection
0510152000.511.52Deflection (in)Force (lbf)ForceSolid at 0.964 in20 lbf at 2 in
Details
Active coils, pitch and frequency are for the spring as entered. Wire length and mass are approximate.
QuantityValueNote
Mean coil diameter D0.843 inOD - d
Outside / inside diameter0.923 / 0.763 inD + d / D - d
Spring index C10.54D / d, aim for 4 to 12
Active coils Na10.05Closed and ground: Nt - 2
Inactive coils2Nt - Na, the end coils
Pitch p0.3089 incoil spacing at free length
Free length L03.264 in
Solid height Ls0.964 ind Nt; up to 1.012 in with 5% tolerance
Travel to solid2.3 inL0 - Ls
Working length1.264 inL0 - deflection
Load at solid22.98 lbfk × travel to solid
MaterialMusic wire (ASTM A228)
Shear modulus G81 GPa (11.75 Mpsi)steps with wire diameter
Tensile strength Sut289.3 ksiA / dm estimate; 1,995 MPa
Allowable stress130.2 ksi45% of Sut
Stress factor1.128Bergstrasser
Slenderness L0 / D3.87taller than about 4 needs the buckling check
Natural frequency159.4 Hzboth ends on plates; 79.71 Hz one end free
Wire length31.91 inpi × D × Nt, approximate
Spring mass20.64 g (0.728 oz)from the wire volume and density
Show the math
Mean diameter and indexD = OD - d = 0.923 - 0.08 = 0.843 in; C = D / d = 0.843 / 0.08 = 10.54
Active coilsNa = Nt - 2 = 10.05 (closed and ground ends); inactive = 2
Spring ratek = G d4 / (8 D3 Na) = 11,750 psi × 0.084 / (8 × 0.8433 × 10.05) = 9.99 lbf/in. G = 81 GPa for Music wire (ASTM A228).
Solid height and travelLs = d Nt = 0.964 in; travel to solid = L0 - Ls = 3.264 - 0.964 = 2.3 in
ForceF = k × y = 9.99 × 2 = 19.98 lbf at the working point; at solid F = 9.99 × 2.3 = 22.98 lbf
Stress factorKB = (4C + 2) / (4C - 3) = (4 × 10.54 + 2) / (4 × 10.54 - 3) = 1.128 (Bergstrasser)
Shear stressτ = K × 8 F D / (π d3). At solid: 1.128 × 8 × 22.98 × 0.843 / (π × 0.083) = 108,600 psi (108.6 ksi). At the working point: 94.47 ksi.
Strength and safety factorSut = A / dm = 2,211 / 2.0320.145 = 1,995 MPa (d in mm); allowable = 45% of Sut = 130.2 ksi; safety factor at solid = 130.2 / 108.6 = 1.2
Bucklingλ = α L0 / D = 0.5 × 3.264 / 0.843 = 1.94. Absolutely stable if L0 < (π D / α) √(2(E - G) / (2G + E)) = 4.252 in (E = 196.5 GPa, G = 81 GPa). Your L0 is below it.
Natural frequencyf = (1/2) √(k / mactive), where mactive is the mass of the active coils (π D Na of wire, density 7,850 kg/m3). Result 159.4 Hz.
Wire length and massLength = π D Nt = π × 0.843 × 12.05 = 31.91 in; mass = density × wire volume = 20.64 g

Short answer: The spring rate is k = G d4 / (8 D3 Na), and the force at any compression is F = k × deflection. G is the shear modulus of the wire, d the wire diameter, D the mean coil diameter and Na the active coils. For the default spring (music wire, 0.08 in wire, 0.923 in outside diameter, 12.05 coils, closed and ground ends), the rate is about 9.99 lbf/in. At 2 in of deflection it pushes back with 20 lbf, and it goes solid at 0.964 in.

Rate is the force a spring adds per unit of compression. It depends on the wire, the coil diameter, the active coils and the material, and not on the free length. Most wrong answers come from putting total coils where active coils belong, or an outside diameter where the mean diameter belongs.

9.99 lbf/in
Spring rate
Force per inch of compression.
20 lbf
Force at 2 in
Rate times deflection.
0.964 in
Solid height
Length with every coil touching.
1.2
Safety factor at solid
Allowable stress divided by actual stress.

This article contains Amazon affiliate links. 33science earns a commission on qualifying purchases. See our affiliate disclosure.

How to use the compression spring calculator

Pick units and material.
Choose inches and pounds or millimetres and newtons, then the wire material. Each preset carries its shear modulus G. Enter your own G for a wire that is not listed.
Enter the wire and the coil diameter.
Give the wire diameter d, then the coil diameter and say which one it is: outside (OD), inside (ID) or mean. The calculator converts to mean diameter D = OD − d or ID + d.
Enter the coils, the ends and the free length.
Count total coils Nt and pick the end type. The end type sets the active coils. Add the free length L0, measured with no load.
Set the working point and read the result.
Enter a deflection, a working length or a load. The tool returns the rate, the force, the solid height, the stress and the design checks, with a force-deflection chart and the math written out with your numbers.

The spring rate formula

Spring rate is k = G d4 / (8 D3 Na), the form given in Shigley’s Mechanical Engineering Design and in DIN EN 13906-1. Thick wire and a high shear modulus stiffen the spring. A wide coil and many active coils soften it. Force follows Hooke’s law, F = k y, where y is the deflection from the free length.

Worked example with the default spring, Shigley Example 10-2. The mean diameter is D = 0.923 − 0.08 = 0.843 in. Closed and ground ends make Na = Nt − 2 = 10.05. Music wire at this size has G = 11.75 Mpsi, so k = 9.99 lbf/in. At 2 in of deflection the spring is 1.264 in long and pushes with 20 lbf. The same spring in millimetres gives the same answer in other units:

QuantityInches and poundsMillimetres and newtons
Wire diameter d0.08 in2.032 mm
Mean diameter D0.843 in21.41 mm
Free length L03.264 in82.906 mm
Solid height Ls0.964 in24.49 mm
Spring rate k9.99 lbf/in1.75 N/mm
Force at solid23 lbf102.2 N
Shear stress at solid108.6 ksi749.1 MPa
Key point
Free length does not appear in the rate formula. Cutting a spring shorter removes active coils, and that is what raises the rate: k is proportional to 1 / Na.

The tool also reproduces Shigley Example 10-1, a 0.037 in wire with 0.4375 in outside diameter, at 4.12 lbf/in. Stored energy is half of force times deflection: the default spring holds about 20 in-lbf at 2 in. The elastic potential energy calculator works that out for any k and deflection, and examples of elastic potential energy shows where springs store it.

Springs combined: in parallel the rates add, k = k1 + k2. In series the compliances add, 1/k = 1/k1 + 1/k2, so the pair is softer than either spring.

Rates of common springs

These are the calculator presets. Wire diameter enters the rate to the fourth power, so it moves the rate more than any other input.

Presetd / OD (mm)L0 (mm)Rate (N/mm)Deflection (mm)Force (N)Safety factor at solid
Pen or latch spring (music wire)0.4 / 4120.70953.551.28
Engine valve spring (chrome-silicon)4 / 305025.6143581.32
General purpose stainless (302)1.5 / 12225.39632.31.41
Heavy chrome-silicon spring6 / 458532.4206491.32
Chrome coil spring wrapped around a motorcycle shock absorber
Vehicle springs follow the same rate formula. Wheel rate also depends on suspension geometry, which this calculator does not model. Photo by Nikola on Unsplash

Total coils, active coils and end types

Active coils are the coils that deflect. The coils pressed flat at each end do not, so the rate uses Na, not the Nt you count. The default spring has 12.05 total coils, closed and ground ends and Na = 10.05. The relations come from Shigley Table 10-1 and agree with Lee Spring.

End typeActive coils NaSolid height LsFree length L0Pitch p
Closed and groundNt – 2d Ntp Na + 2d(L0 – 2d) / Na
Closed, not groundNt – 2d (Nt + 1)p Na + 3d(L0 – 3d) / Na
Plain (open) endsNtd (Nt + 1)p Na + d(L0 – d) / Na
Plain and groundNt – 1d Ntp (Na + 1)L0 / (Na + 1)

Here p is the pitch, the distance from one coil to the next. Closed and ground ends are the usual choice because the spring stands square. Solid height is nominal: a real spring can run about 5 percent taller (Autodesk), and the tool shows that as the maximum solid height, 1.01 in for the default spring.

Spring index and the Wahl factor

Spring index is C = D / d, the mean diameter over the wire diameter. The default spring has C = 10.54. Aim for 4 to 12. Below 4 the wire is hard to coil and carries high stress on the inside of each turn. Above 12 springs tangle and are hard to hold to tolerance. The calculator flags an index outside that range (Shigley eq. 10-18; DIN EN 13906-1 uses the same window).

Stress in the wire is higher than the plain torsion value because the coil curves the wire. A curvature factor K corrects for it: τ = K × 8 F D / (π d3). Two versions are in common use. Bergstrasser: KB = (4C + 2) / (4C − 3), 1.128 for the default spring. Wahl: Kw = (4C − 1) / (4C − 4) + 0.615 / C, 1.137. They differ by about 1 percent for any index from 4 to 12. The calculator uses Bergstrasser as in Shigley and switches to Wahl, the factor Lee Spring uses, with one control.

Stress, solid height and taking a set

A spring takes a set, which means it stays shorter after you release it, when the stress at solid height passes the yield strength of the wire. Compare the corrected shear stress at solid with an allowable fraction of the tensile strength Sut. For music wire that fraction is 45 percent. If you preset the spring at the factory by compressing it solid so that it sets before use, the allowable rises to about 65 percent.

94.47 ksi
Stress at 2 in
32.7 percent of Sut.
108.6 ksi
Stress at solid
37.5 percent of Sut.
130.2 ksi
Allowable
45 percent of 289.3 ksi.
1.2
Safety factor at solid
Meets the 1.2 minimum.

Sut is an estimate from A / dm with constants from Shigley, so get the certified figure from the wire supplier for a critical spring. The default spring sits at the recommended safety factor of 1.2 at solid. Its travel margin is 15 percent: 2.3 in of travel to solid against a 2 in working deflection. Shigley recommends at least 15 percent so the spring never runs to coil bind in service, and 3 to 15 active coils.

When a compression spring buckles

A long, thin spring bows sideways instead of compressing straight. The risk rises with free length over mean diameter and depends on how the ends are held. The slenderness is λ = α L0 / D, where α is set by the end supports:

End supportα
Both ends flat on plates (fixed)0.5
One end flat, one end on a pivot0.707
Both ends on pivots1
One end fixed, one end free2

A spring is absolutely stable, meaning it cannot buckle at any deflection, when its free length is under about 2.5 D / α for spring steel (Shigley eq. 10-12). The default spring has λ = 1.94 and a limit of 4.25 in against a free length of 3.264 in, so it is stable. Flat plates on both ends (α = 0.5) need squared and ground ends. If your spring is over the limit, the calculator reports the critical deflection, and the working deflection must stay under it. Run the spring on a rod or in a bore, or shorten the free length.

Spring materials and shear modulus

The rate is proportional to G. G steps down as the wire gets thicker, and the calculator follows it by wire diameter (Machinery’s Handbook). Sources differ by a few percent: music wire is 11.5 Mpsi at PTC and up to 12 Mpsi in Shigley, a 4 percent difference in rate. The same geometry in stainless 302 is about 15 percent softer than music wire, and phosphor bronze gives about half the rate.

WireG (Mpsi)G (GPa)Allowable % of Sut, before / after set removalTypical use
Music wire (ASTM A228)11.6-1280-82.745 / 65Small precision springs, latches and pens. Highest strength of the common wires.
Hard-drawn wire (ASTM A227)11.4-11.778.6-80.745 / 65Low-cost general purpose springs under static loads.
Oil-tempered wire (ASTM A229)11.277.250 / 70General purpose springs in larger wire sizes, moderate stress.
Chrome-vanadium (ASTM A231/A232)11.277.250 / 70Shock loads and moderate heat.
Chrome-silicon (ASTM A401)11.277.250 / 70High-stress, high-cycle springs such as engine valve springs.
Stainless 302 (ASTM A313)106935 / 60Corrosion resistance, food and outdoor use.
Phosphor bronze (ASTM B159)641.435 / 60Corrosion resistance and electrical conductivity at low loads.

How to measure a spring you have

Measure the wire first, because the rate depends on d to the fourth power: a 1 percent error in d is about a 4 percent error in k, and 1 percent in the mean diameter is about 3 percent. Use a digital caliper on a straight stretch of wire and average a few spots. Then measure the outside diameter across the coils, and enter it as an outside diameter so the tool subtracts d.

Hands measuring the wire diameter of a small compression spring with digital calipers on a workbench
Measure the wire diameter with calipers at several points along the coil.

Count the turns of wire from one end to the other, including the closed end coils, and estimate the last fraction by eye. That count is Nt. Measure the free length with nothing on the spring. Flat end faces mean closed and ground ends.

A scale confirms the calculated rate. Stand the spring upright on a kitchen scale, press it down square to a measured deflection y, read the mass and convert: F = mass × 9.81 N/kg, then k = F / y. The pen spring preset has a rate of 0.709 N/mm, so 5 mm of compression should read about 360 g, roughly 72 g per millimetre. Take two readings and use the slope between them, since the first stretch of travel on unground ends is not linear.

Hand pressing a compression spring down on a kitchen scale with a steel ruler beside it to measure force and length
A rate check: press the spring to a known deflection on a scale and divide the force by the deflection.

A measured rate below the calculated one points to a miscounted Na or a diameter entered as the wrong type.

Common mistakes

Do
Count total coils and let the end type set the active coils
State whether the diameter you measured is OD, ID or mean
Keep every length in one unit and G in the matching unit
Check stress and solid height as well as the rate
Leave travel between the working length and solid height
Avoid
Use total coils in the rate formula
Enter an outside diameter as the mean diameter
Mix inches with millimetres or Mpsi with GPa
Design to a rate and skip the stress check
Use solid height as the working stop

Free length minus solid height is the travel to solid, not the working travel. A deflection past solid is clamped to solid height by the calculator and flagged.

Natural frequency and surge

A spring that is cycled quickly can resonate along its length and lose its stroke, which is called surge. The calculator gives the natural frequency, 159 Hz for the default spring with both ends on plates. Keep it at 15 to 20 times the operating frequency or higher, so this spring suits cycling up to roughly 8 to 11 Hz (Shigley eq. 10-25). For the energy of a mass on a spring, try the mechanical energy calculator.

Sources

Frequently asked questions

How do you calculate the spring rate of a compression spring?

Use k = G x d^4 / (8 x D^3 x Na), where G is the shear modulus of the wire, d the wire diameter, D the mean coil diameter and Na the active coils. The default spring works out to 9.99 lbf/in, or 1.75 N/mm.

How do you calculate the force of a compression spring?

Multiply the rate by the deflection, F = k x y, where y is the free length minus the compressed length. The default spring has a rate of 9.99 lbf/in, so 2 in of deflection gives 20 lbf.

Should I use total coils or active coils?

Use active coils in the rate formula. Active coils equal total coils minus the end coils that do not deflect: two fewer for closed ends, none for plain open ends.

Do I enter mean, outside or inside coil diameter?

Enter whichever you measured and label it correctly. The rate formula needs the mean diameter, which is the outside diameter minus the wire diameter, or the inside diameter plus it.

What spring index should I aim for?

Aim for a spring index between 4 and 12. Lower values are hard to coil and stressed on the inside of the turn, and higher values tangle and drift from tolerance.

What is the Wahl factor?

The Wahl factor is a stress correction for the curvature of the wire, K = (4C – 1) / (4C – 4) + 0.615 / C. For the default spring it is 1.137, against 1.128 for the Bergstrasser factor.

What is solid height and how is it calculated?

Solid height is the length of the spring with every coil touching. For closed and ground ends it is the wire diameter times the total coils, which is 0.964 in for the default spring.

When will a compression spring buckle?

A spring buckles when it is slender and compressed past a critical deflection. It cannot buckle if the free length is below about 2.5 times the mean diameter divided by the end constant alpha, which is 4.25 in for the default spring.