# Spring Compression Energy Calculator

Calculate the elastic potential energy and force of a spring in compression or extension. U = ½·k·x², F = k·x. Solve energy from displacement, or displacement from energy.

> Canonical page: https://elysiatools.com/en/tools/spring-compression-energy

- **Category:** Math & Numbers

- **Keywords:** spring energy, elastic potential energy, spring force, Hooke's law, compression spring, mechanical engineering

## Overview

The Spring Compression Energy Calculator helps mechanical engineers and designers quickly compute the elastic potential energy and force of a spring under compression or extension. By inputting the spring rate and either displacement or target stored energy, the tool solves for the missing variables using Hooke's Law and the elastic potential energy formula.

## Inputs

- **Calculation Mode** (select)
- **Spring Rate k (N/mm)** (number): e.g. 10
- **Displacement x (mm)** (number): Spring displacement (compression or extension). Required in Energy mode.
- **Stored Energy U (J)** (number): Target stored energy. Required in Displacement mode.
- **Decimal Places** (number)

## When to use

- When designing mechanical suspension systems or shock absorbers that require specific spring rates and energy absorption capacities.
- When calculating the force exerted by a compressed or extended spring at a specific displacement.
- When determining the required spring displacement needed to store a target amount of elastic potential energy.

## How it works

- Select the calculation mode: either 'Energy from displacement' or 'Displacement from energy'.
- Enter the spring rate (k) in Newtons per millimeter (N/mm).
- Input either the displacement (x) in millimeters or the target stored energy (U) in Joules, depending on the selected mode.
- Click calculate to instantly generate the spring force, stored energy, and step-by-step formula breakdown.

## Use cases

- Sizing springs for mechanical assemblies to ensure they do not exceed maximum force limits.
- Calculating energy storage in spring-loaded mechanisms like launchers, valves, or latch systems.
- Verifying test lab measurements of spring deflection against theoretical energy values.

## Frequently asked questions

### What units are used for the spring rate (k) and displacement (x)?

The spring rate is measured in Newtons per millimeter (N/mm) and displacement is measured in millimeters (mm).

### Can this calculator be used for extension springs?

Yes, the formulas for elastic potential energy and force apply equally to both compression and extension springs.

### How does the calculator convert units to output energy in Joules?

The calculator automatically scales the displacement from millimeters to meters during calculation to output the energy directly in Joules (Newton-meters).

### What is Hooke's Law?

Hooke's Law states that the force (F) needed to extend or compress a spring by some distance (x) scales linearly with that distance, represented as F = k * x.

### Can I calculate the displacement if I only know the target energy and spring rate?

Yes, switch the calculation mode to 'Displacement from energy' and input the spring rate and target energy in Joules.

## Related tools

- [Mass Flow Rate Converter (kg/s / lb/h / t/h)](https://elysiatools.com/en/tools/flow-rate-mass-converter): Convert mass flow rate between kg/s (kilograms per second, SI base), lb/h (pounds per hour, 1 lb = 0.45359237 kg), and t/h (tonnes per hour, 1 t = 1000 kg). Converts via kg/s to the target unit and also lists the equivalent value in all three units for reference. Used for boiler feedwater, chemical dosing, fuel consumption, and compressed-gas metering.
- [Volumetric Flow Rate Converter (m³/h / L/min / gpm / cfm)](https://elysiatools.com/en/tools/flow-rate-volume-converter): Convert volumetric flow rate between m³/h (cubic metres per hour), L/min (litres per minute), gpm (US gallons per minute, 1 gal = 3.785411784 L), and cfm (cubic feet per minute, 1 ft³ = 28.3168466 L). Converts via m³/s to the target unit and also lists the equivalent value in all four units for reference. Used for pumps, HVAC, compressed air, and piping.
- [Stress & Strain Calculator](https://elysiatools.com/en/tools/stress-strain-calculator): Calculate engineering stress σ = F/A and engineering strain ε = ΔL/L₀ under uniaxial load. Choose what to solve: for stress, enter force F (N) and cross-section area A (mm²) → result in MPa; for strain, enter original length L₀ and elongation ΔL (negative for compression) → dimensionless ratio. Units are self-consistent (N, mm) so stress comes out directly in MPa.
- [Absolute Value Calculator](https://elysiatools.com/en/tools/absolute-value-calculator): Calculate the absolute value of positive, negative, or decimal numbers and explain the sign relationship
- [Adjusted R-Squared Calculator](https://elysiatools.com/en/tools/adjusted-r-squared-calculator): Calculate adjusted R squared from R squared, sample size, and predictor count
- [Air Changes per Hour (ACH, n = Q/V)](https://elysiatools.com/en/tools/air-changes-per-hour): Compute the air change rate (ACH / n) of a room from the outdoor supply airflow Q and the room volume V: n = Q/V (1/h). Three modes: solve ACH (given Q and V), solve airflow (given n and V), or solve volume (given n and Q). Flow in m³/s/m³/h/CFM, volume in m³/ft³/L. Also reports the well-mixed single-zone purge time to reach a target residual fraction ε (default 1%): t = −ln(ε)/n hours.
- [Bearing Life L10 Calculator](https://elysiatools.com/en/tools/bearing-life-l10): Calculate the basic rating life of a rolling bearing: L10 = (C/P)^p, with p = 3 for ball bearings and p = 10/3 for roller bearings. When a speed is provided, converts to L10h in operating hours.
- [Bernoulli Equation Solver (Velocity / Pressure / Elevation)](https://elysiatools.com/en/tools/bernoulli-equation-solver): Solve the Bernoulli equation p/(ρg) + v²/(2g) + z = const for steady, ideal, incompressible flow between two points on a streamline. Supply all three upstream quantities (p₁, v₁, z₁) and any two of the three downstream quantities; the tool solves for the third. Solve velocity: v₂ = √\[v₁² + 2(p₁-p₂)/ρ + 2g(z₁-z₂)\] — a negative radicand is physically impossible and is rejected. Solve pressure: p₂ = p₁ + ½ρ(v₁²-v₂²) + ρg(z₁-z₂). Solve elevation: z₂ = z₁ + (p₁-p₂)/(ρg) + (v₁²-v₂²)/(2g). g = 9.81 m/s². Density in kg/m³/g/cm³, pressure in Pa/kPa/bar/atm/psi, velocity in m/s, elevation in m/cm/ft. The upstream pressure/velocity/elevation heads and the total head are also reported.

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Spring Boot Samples](https://elysiatools.com/en/samples/spring-boot): Spring Boot framework examples including REST APIs, dependency injection, JPA, security, and modern Spring Boot features
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
