Most textbooks and guides do not clearly distinguish between types of helical compression springs when giving equations for solid height of the spring. Fortunately, exact values of solid height are not needed in many cases. However, in cases where space is tight, such as in aerospace designs and high-performance automotive engines, weight and volume are critical and space can be limited.
There are three types of compression spring commonly used: unground, ground, and ground and squared. (Ground springs have the top and bottom coils machined to be flat. With squared springs, the top and bottom coils have less pitch then the others and they are not parallel to the other coils.)
For an unground spring, the solid height, h1, is (n+1)d, where n is the number of coils and d is the wire diameter (including platings and coating) in inches.
For springs that are ground but not squared, the height, h2, is (n-1)d.
Springs that are ground and squared, the solid height, h3, is (n-0.75)d. The correction factor, 0.75, is an average value that will vary depending on the particular design and manufacturer. To be accurate, this value should be checked for each design.