ForHosting KIT · Developer Utilities

Slider-Crank Piston Position Calculator

This slider-crank piston position calculator finds the instantaneous location of a piston or slider from the crank angle, crank radius, and connecting rod length.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

It reports the piston-pin position measured from the crankshaft center along the line of stroke, plus displacement from top dead center, so the reference convention is explicit. The calculation uses exact slider-crank geometry and accepts any consistent length unit, making it useful for engines, compressors, pumps, presses, and mechanism studies.

Define the mechanism and reference position

A slider-crank converts crank rotation into reciprocating motion through a rigid connecting rod. Enter the crank angle in degrees, with zero degrees at top dead center, then provide the crank radius and the center-to-center connecting rod length. Both lengths must use the same unit: millimeters, inches, centimeters, or another consistent unit all work because the equation is dimensionally uniform. The reported piston_position_from_crank_center is the distance from the crankshaft axis to the piston pin along the line of stroke. The calculator also reports displacement_from_top_dead_center, which starts at zero when the crank angle is zero and increases as the piston travels toward bottom dead center. Providing both values avoids a frequent engineering mistake: calling two different reference measurements simply “piston position.” The connecting rod must be at least as long as the crank radius. That condition permits a complete revolution and matches the conventional in-line slider-crank geometry assumed by this calculation. Crank angles outside one revolution are normalized to the equivalent angle from zero up to, but not including, 360 degrees.

Understand the geometry behind the result

The calculation resolves the crank pin into components parallel and perpendicular to the line of stroke. If r is crank radius, l is connecting rod length, and θ is crank angle, piston position from the crank center is x = r cos(θ) + √(l² − r² sin²(θ)). The square-root term is the connecting rod component along the stroke axis. Top dead center is located at l + r, so displacement from top dead center is l + r − x. For an in-line mechanism, bottom dead center is l − r and total stroke is exactly 2r. Notice that piston travel is not a perfect sine wave when the connecting rod has finite length. Rod angularity makes piston motion asymmetric around mid-stroke: equal increments of crank angle do not always produce equal increments of piston travel. A longer rod relative to the crank reduces this secondary geometric effect, while a shorter rod makes it more pronounced. The calculator applies the rigid-link, zero-offset model and returns stable numeric values without simulation, iteration, random sampling, or external data.

Use the output in design and analysis

Use the position result to build displacement tables, compare candidate rod ratios, locate events at specified crank angles, or verify a CAD sketch. For a series of angles, call the calculation once per angle and keep radius, rod length, and length unit unchanged. The returned stroke and dead-center positions provide convenient checks: at zero degrees, displacement from top dead center should be zero; at 180 degrees it should equal twice the crank radius. The model assumes the cylinder or slider axis passes through the crankshaft center, the links are perfectly rigid, joints have no clearance, and dimensions do not change under load or temperature. It therefore describes mechanism geometry rather than measured running behavior. Real machines may add wrist-pin offset, cylinder-axis offset, bearing clearance, elastic deformation, or manufacturing tolerance. Those effects require an offset or compliance model and should not be folded into the basic inputs. For automated API use, each calculation costs $0.002. Reject or investigate results produced from uncertain dimensions rather than treating numerical precision as evidence that the source measurements are equally precise.

Build an engine displacement curve

Calculate piston travel at successive crank angles for kinematic plots, timing studies, or comparison of connecting-rod ratios.

Check a compressor or pump mechanism

Find the instantaneous slider location needed to relate crank rotation to chamber volume or plunger travel.

Verify a machine design

Cross-check dead-center locations, stroke, and a selected intermediate position against CAD or hand calculations.

What does piston position mean in this result?

It is the piston-pin distance from the crankshaft center along the line of stroke. A separate field gives displacement measured from top dead center.

Which length units can I use?

Use any length unit, provided crank_radius and connecting_rod_length use the same one. Every returned length uses that same unit.

Where is zero crank angle?

Zero degrees is top dead center, where the crank and connecting rod extend along the line of stroke toward the piston.

Does this support an offset cylinder or slider axis?

No. It models a conventional in-line slider-crank whose line of stroke passes through the crankshaft center.

Why must the connecting rod be at least as long as the crank radius?

A shorter rod cannot satisfy the rigid-link geometry through a complete crank revolution. The restriction ensures a real position at every angle.

What does an API calculation cost?

Each API request costs $0.002. The calculation is deterministic and does not call external services.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/eng/slider-crank-position

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/eng/slider-crank-position \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"crank_angle_deg":60,"crank_radius":50,"connecting_rod_length":150}'
{
  "crank_angle_deg": 60,
  "crank_radius": 50,
  "connecting_rod_length": 150
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "eng.slider_crank_position",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →