A helical compression spring under axial load doesn't bend its wire — the coil geometry converts the applied force into pure torsion along the wire itself, which is exactly why spring rate depends on the wire's shear modulus G, not its Young's modulus E. Rate falls off steeply with coil diameter (D³) and rises steeply with wire diameter (d⁴), which is why a small change in either has an outsized effect — doubling the wire diameter alone multiplies the rate by sixteen.
A 3 mm music-wire spring with a 25 mm mean coil diameter and 10 active coils has a rate of about 5.1 N/mm — a 50 N load compresses it roughly 9.7 mm, well inside the material's elastic limit for this geometry.
The simple torsion formula assumes the wire is straight — real coiled wire has curvature that concentrates stress on the inside of each coil. The Wahl factor corrects for both that curvature and direct shear, and matters most for "tight" springs with a low spring index (D/d).
D/d between about 4 and 12 is the practical sweet spot — much lower and the spring becomes hard to coil and stress concentrates badly at the inside of each turn; much higher and the spring tends to buckle or tangle sideways under load.
The end coils of a compression spring are typically ground flat and squared off to sit properly against the mounting surfaces — they carry load but don't meaningfully twist, so they're excluded from the stiffness calculation even though they add to the spring's solid (fully compressed) length.
The same rate formula applies, but an extension spring is usually wound with initial tension between coils, so it doesn't start extending until the applied force exceeds that preload — and it needs hooks or loops engineered against their own separate stress concentration.