Is compressing a spring positive or negative work?
According to Hooke's law, a spring's force is proportional to its displacement (or linear amount of stretching or compressing):
Where is referred to as the spring constant of the force. Each spring's force constant is unique.
In general, Hooke's law is accurate for any spring within a limited range of motion. We know from experience that a spring can be stretched to the point where it suffers damage and stops working properly.
Hence, work done on a spring when it is compressed is negative.