Spring Calculator (Compression, Extension, Torsion Design) avatar

Spring Calculator (Compression, Extension, Torsion Design)

Pricing

Pay per event

Go to Apify Store
Spring Calculator (Compression, Extension, Torsion Design)

Spring Calculator (Compression, Extension, Torsion Design)

Helical spring calculator from plain text: rate, stress, safety factors, solid and free length, buckling, surge and fatigue for compression, extension and torsion springs, and compression spring design from loads and space.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Jumble Mog

Jumble Mog

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Security

Limited permissions

Share

Size or check a coil spring from one line of text. Type design a compression spring: 200 N at 40 mm, 100 N at 50 mm, fits in a 25 mm hole or music wire 2 mm, OD 20 mm, 10 total coils, squared and ground, free length 60 mm, 150 N at 40 mm. You get back:

  • The rate and the stress and safety factor at every load, with the Bergsträsser (or Wahl) curvature correction.
  • The lengths: free, solid, pitch, and the longest free length that can be closed solid without taking a set.
  • The checks: safety when closed solid, buckling, surge frequency, overrun to solid, and fatigue (Gerber with Zimmerli data) when there are two loads.
  • The wire strength for the actual wire size (Sut = A/d^m) and the allowable stress for the material, set removal and shot peening.
  • For design requests: every standard wire size is tried at spring indexes 4 to 12, and the lightest spring that meets the loads, space, solid safety, buckling and fatigue margins comes back, with the other sizes that work.
  • A chart: the load line with each load point, next to each stress as a share of its allowable.

It covers three kinds of helical spring:

  • Compression: analyze or design. Plain, plain and ground, squared, or squared and ground ends.
  • Extension: rate, initial tension (and whether it can be wound in), body stress and the hook bending and torsion stresses.
  • Torsion: rate per turn and per degree (legs included), bending stress, and how far the coil closes down on its arbor.

Seven wires: music wire (A228), oil-tempered (A229), hard-drawn (A227), chrome-vanadium (A232), chrome-silicon (A401), 302 stainless (A313) and phosphor bronze (B159). Millimetres and newtons, or inches and pounds: results come back in the units you wrote.

It's made for:

  • Mechanical and product designers sizing a spring before ordering samples.
  • Makers, repair shops and students checking a spring they already have.
  • AI agents that need real spring numbers instead of a guess.

A compression spring designed by this Actor for 200 N at 40 mm and 100 N at 50 mm inside a 25 mm hole: 2.8 mm music wire, the load line from free to solid with both load points, and the stresses at 61% and 30% of the allowable at the two loads and 81% when closed solid

How to use it

  1. Write Springs, one per entry. The form has examples.
  2. Optionally set the Default material and the Units for numbers written without one.
  3. Click Start. Each spring is a row in the results, with its summary, chart and report.

Writing a spring

You writeIt means
music wire 2 mm, 2 mm chrome-silicon wire, d = 0.08 inthe wire and material
OD 20 mm, ID 16 mm, mean diameter 18 mmthe coil size
10 total coils, 8 active coils, 20 body coils, 6 body turnsthe coils
squared and ground, plain ends, squaredcompression ends
free length 60 mmfree length
150 N at 40 mm, compressed to 45 mm, 10 mm deflection, 20 lbfloads
initial tension 12 Nextension springs
450 N·mm, 90°, legs 25 mmtorsion springs
set removed, shot peened, cyclicallowable stress and fatigue
design ..., fits in a 25 mm hole, over a 10 mm rod, max free length 80 mm, rate 10 N/mmdesign a compression spring

Objects work too; see Input.

Examples

All of these ran on this Actor; the numbers are from the results.

SpringResult
music wire 0.037 in, OD 0.4375 in, 12.5 total coils, squared and ground (Shigley Example 10-2)Rate 4.115 lbf/in, solid 0.4625 in; a free length up to 2.026 in can close solid without a set (the book: 4.116 lbf/in and 2.03 in)
design a compression spring: 200 N at 40 mm, 100 N at 50 mm, fits in a 25 mm hole, music wire, cyclic2.8 mm wire, OD 21.28 mm, 9.9 active / 11.9 total coils, free length 60.08 mm, rate 9.96 N/mm; safety 1.65 at 200 N, 1.24 at solid, fatigue 1.57. 3.0 mm wire also works
extension spring, hard-drawn 1.5 mm wire, OD 12 mm, 20 body coils, initial tension 12 N, 40 NRate 2.143 N/mm, free length 49.5 mm; at 40 N the hook bending is the weakest spot, safety 1.67
torsion spring, music wire 1.5 mm, OD 15 mm, 6 body turns, legs 25 mm, 450 N·mm1086 N·mm/turn; 450 N·mm winds it 149°, 1481 MPa, safety 1.10; the inside diameter closes to 11.13 mm
Valve spring: chrome-silicon 4 mm, OD 30 mm, 8 total coils, shot peened, 300 N at 50 mm and 40 mmFree length 62.81 mm, rate 23.43 N/mm, fatigue safety 1.59, but closed solid it passes the allowable (safety 0.94): a warning says so

The tests check that:

  • Shigley's Example 10-2 comes out: Sut 323.6 kpsi, rate 4.116 lbf/in, free length 2.03 in.
  • Rates, extension free lengths, torsion stresses and equivalent turns match their formulas.
  • Design results fit the hole, meet the rate, keep the solid safety and come back lightest first; an impossible design says why.
  • The text forms above are read correctly, including US units only when a number carries them.

How-to examples

Each example is a complete input; the results are from runs of the Actor (also listed under Examples).

How to design a compression spring for two loads and a hole

{"springs": ["design a compression spring: 200 N at 40 mm, 100 N at 50 mm, fits in a 25 mm hole, music wire, cyclic"]}

Result: 2.8 mm wire, OD 21.28 mm, 9.9 active and 11.9 total coils, free length 60.08 mm, rate 9.96 N/mm; safety 1.65 at 200 N, 1.24 at solid, fatigue 1.57. A 3.0 mm wire also works.

How to calculate a spring's rate and solid length

{"springs": ["music wire 0.037 in, OD 0.4375 in, 12.5 total coils, squared and ground"]}

Result: this is Shigley's Example 10-2: rate 4.115 lbf/in and solid length 0.4625 in; a free length up to 2.026 in can close solid without taking a set (the book: 4.116 lbf/in and 2.03 in).

How to check a torsion spring

{"springs": ["torsion spring, music wire 1.5 mm, OD 15 mm, 6 body turns, legs 25 mm, 450 N·mm"]}

Result: 1086 N·mm per turn; 450 N·mm winds it 149° at 1481 MPa, safety 1.10, and the inside diameter closes to 11.13 mm.

How to let an AI agent size springs

Add this Actor to the Apify MCP server with https://mcp.apify.com/?tools=jumblemog/spring-calculator. The agent describes the spring or the loads and space in one line and answers with the wire, coils, free length and safety factors.

FAQ

Which springs does it handle? Round-wire helical compression, extension and torsion springs. The design search covers compression springs; extension and torsion springs are checked from their wire and coil size.

Which materials are built in? Seven wires: music wire (A228), oil-tempered (A229), hard-drawn (A227), chrome-vanadium (A232), chrome-silicon (A401), 302 stainless (A313) and phosphor bronze (B159).

Does it check fatigue and buckling? Yes: fatigue by Gerber against Zimmerli's endurance data (unpeened or shot peened), buckling, and the surge frequency.

Are the results ready to order? They're engineering estimates; confirm critical springs with the maker and a test.

Input

FieldWhat it is
springsSprings, as text or objects.
materialDefault wire for springs that don't name one (music wire if unset).
unitsmm (default) or in, for numbers written without a unit.
chartsDraw charts (default on).

A spring as an object takes:

  • type: compression (default), extension or torsion; mode: analyze or design.
  • material, wire, and one of od, id or meanDiameter.
  • activeCoils, totalCoils or bodyCoils; ends; freeLength.
  • loads: a list of objects with force, length, deflection, moment or angle.
  • Design: rate, holeDiameter, rodDiameter, maxFreeLength, maxSolidLength, minSafety (1.2), minFatigueSafety (1.5).
  • setRemoved, peened, cyclic, endSupport (fixed, pinned, fixed-pinned, free), initialTension, legs, units, title.
  • text: a line of text, with the other fields overriding what it says.

Output

One dataset item per spring, also saved together in the run's OUTPUT record:

{
"request": 2, "status": "ok", "type": "compression", "mode": "design",
"title": "Designed compression spring, music wire",
"units": {"length": "mm", "force": "N", "stress": "MPa", "rate": "N/mm"},
"spring": {"material": "Music wire", "astm": "A228", "wireDiameter": 2.8, "outsideDiameter": 21.28,
"springIndex": 6.6, "activeCoils": 9.9, "totalCoils": 11.9, "ends": "squared and ground",
"freeLength": 60.0791, "solidLength": 33.32, "pitch": 5.5029, "massGrams": 33.394},
"rate": 9.96061,
"material": {"sut": 1904.37, "allowableShear": 856.97},
"points": [{"force": 200.0, "length": 40.0, "deflection": 20.0791, "stress": 520.36, "safety": 1.647},
{"force": 100.3939, "length": 50.0, "deflection": 10.0791, "stress": 261.2, "safety": 3.281}],
"solid": {"force": 266.5369, "stress": 693.47, "safety": 1.236},
"fatigue": {"alternating": 129.58, "mean": 390.78, "allowableAlternating": 203.29, "safety": 1.569},
"alternatives": [{"wireDiameter": 3.0, "outsideDiameter": 23.7, "activeCoils": 9.2, "solidSafety": 1.366, "...": "..."}],
"imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/002-....png"
}

Extension springs add initialTension and the hook stresses at each load; torsion springs give ratePerTurn, ratePerDegree and the moment, angle and inside diameter at each load. Every item has warnings, notes (the formulas and assumptions), a Markdown report and links to the chart and report. A request that can't be computed has "status": "failed" and the reason in error, and isn't billed.

How it works

  1. Reading: each line is read for the wire, coil size, coils, ends, loads and design needs; numbers carry their units.
  2. Wire strength: Sut = A/d^m with the constants for the material and size range; E and G by size.
  3. Allowables: torsion as a share of Sut for compression and extension bodies (set removed or not), hook bending and torsion for extension springs, bending for torsion springs (Shigley Tables 10-6 and 10-7, eq. 10-57).
  4. Analysis: rate k = d⁴G/(8D³Na), stress τ = K_B·8FD/(πd³), the solid and free lengths from the end type, buckling at 2.63·D/α, surge frequency, and fatigue by Gerber against Zimmerli's endurance data.
  5. Design: for each standard wire size, spring indexes 4 to 12 set the coil diameter and active coils for the rate; springs that fit the space with 15% overrun to solid, solid safety 1.2, no buckling and (if cyclic) fatigue safety 1.5 are kept, lightest first.

Results are engineering estimates; confirm critical springs with the maker and a test.

Pricing

You pay one low price per spring, at the price shown on this page. It includes the chart and the report. Requests that can't be computed are never charged. If you set a maximum cost per run, the Actor stops before a request that wouldn't fit.

Speed

A spring takes a few milliseconds and a design search well under a second, plus the chart. A run through the API answers in about 5 to 10 seconds, including the cloud container starting.

Tips and limits

  • Round-wire helical springs only: no conical, barrel, flat, wave or disc springs, and no square wire.
  • Design search covers compression springs; for extension and torsion springs give the wire and coil size and it checks them.
  • Static allowables assume room temperature. Hot springs relax: derate them, or use chrome-silicon or stainless.
  • Fatigue uses Zimmerli's data for steel wire under 10 mm (unpeened or shot peened), which is conservative for most spring steels; it isn't applied to phosphor bronze limits.
  • Extension hooks are full loops with the bend radius at B taken as 2d unless your maker says otherwise.
  • Limits: 500 springs per run.

For AI agents and developers

This Actor works with the Apify MCP server, so AI agents can call it as a tool. Pass springs as plain text and read summary, rate, points[].safety, solid.safety, fatigue.safety, warnings and, for designs, spring and alternatives. A direct API call that waits for the answer:

curl -X POST "https://api.apify.com/v2/acts/jumblemog~spring-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"springs": ["design a compression spring: 50 N at 30 mm, 20 N at 40 mm, over a 6 mm rod, stainless"]}'

run-sync instead returns the run's OUTPUT: the status, the counts and every result as JSON.

In Python, with the apify-client package:

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/spring-calculator").call(run_input={
"springs": [{"material": "chrome-silicon", "wire": "4 mm", "od": "30 mm", "totalCoils": 8,
"ends": "squared and ground", "peened": True,
"loads": [{"force": "300 N", "length": "50 mm"}, {"length": "40 mm"}]}],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["summary"])

Credits

  • Charts: Vega-Lite and vl-convert (BSD-3-Clause), with the Inter font (SIL Open Font License).
  • Method: Budynas and Nisbett, Shigley's Mechanical Engineering Design, chapter 10 (spring rate, curvature factors, wire strength constants, allowables, buckling, surge and Zimmerli fatigue data), which summarizes the ASTM A227, A228, A229, A232, A401, A313 and B159 wire standards and Spring Manufacturers Institute practice.