# Hooke's Law

**Formula:**`F = k * x`

## Introduction to Hooke's Law Calculator

Hooke's Law is a principle of physics that states the force F needed to extend or compress a spring by some distance X is proportional to that distance. That is, ** F = k * x**, where F is the force applied, k is the force constant of the spring (also known as the spring constant), and x is the extension (or compression) of the spring from its original length.

## Parameter usage:

`forceConstant`

= spring constant (k), must be greater than 0.`extension`

= extension or compression distance (x), must be greater than 0.

## Example valid values:

`forceConstant`

= 300 N/m`extension`

= 0.2 m

## Output:

`force`

= force required (F)

## Data validation

Checks are included to ensure both the force constant and extension are positive values.

## Summary

This calculator determines the force required to either extend or compress a spring based on Hooke's Law, illustrating the proportional relationship between force and displacement.

Tags: Physics, Hooke S Law, Spring, Force, Extension