Spring constant can be defined as the force required per unit extension or unit compression of the spring.
Materials with larger spring constants are stiffer.
Hooke’s Law is a principle of physics that states that the that the force needed to extend or compress a spring by some distance is proportional to that distance.
Formula to calculate spring constant.

Example:
Suppose a force of 20N was suspended on a spring, the spring stretch was 0.02cm, calculate the spring constant.

Thus, the spring constant is 1,000 Nm.