Crank Slider Calculator

The crank slider, or slider-crank mechanism, is the geometry that turns the spinning of a crankshaft into the straight-line stroke of a piston, and it sits at the core of every reciprocating engine, compressor and pump. This calculator solves the exact piston position for any crank angle. You provide three quantities: the crank radius, which is half the stroke, the connecting rod length that links the crank pin to the piston, and the crank angle measured from top dead center. From these it computes the displacement of the slider along its axis using the precise geometric relationship, not a simplified sine approximation, so the off-axis swing of the connecting rod is accounted for correctly. That distinction matters because real engines have finite rod ratios, and the rod swing introduces a secondary motion that affects timing, vibration and side load. Enter your own dimensions to study a particular engine, design a mechanism, or check a textbook problem. The results update as you type and respect the rod ratio exactly. Every figure here is computed deterministically from the standard slider-crank position equation, which is shown in full below alongside a worked example that reconciles exactly to the calculator so you can follow each step of the arithmetic.

The piston position is x = r cos(theta) + sqrt(l squared minus (r sin theta) squared). With a crank radius of 50 mm, a rod length of 200 mm and a crank angle of 45 degrees, the slider sits 232.21 mm from the crank center. The stroke is 2r, here 100 mm.

Source: US National Highway Traffic Safety Administration (NHTSA). As at 25 June 2026.

Half the piston stroke
Crank pin to piston pin
Measured from top dead center
Rod ratio l / r--
Stroke (2r)--
Piston position x--

Slider-crank position formula

x = r cos(theta) + sqrt( l^2 - (r sin theta)^2 )
r = crank radius
l = connecting rod length
theta = crank angle from top dead center
stroke = 2r, rod ratio = l / r

The first term, r cos(theta), is the projection of the crank onto the slider axis. The square-root term is the projection of the connecting rod onto the same axis, which shortens as the rod swings off-axis. Their sum is the distance from the crank center to the piston pin along the slider line.

Worked example

A crank of radius 50 mm drives a piston through a 200 mm connecting rod. Find the piston position at a crank angle of 45 degrees.

  1. r cos(theta) = 50 x cos(45) = 50 x 0.707107 = 35.3553
  2. r sin(theta) = 50 x sin(45) = 35.3553, squared = 1,250
  3. l^2 - 1,250 = 40,000 - 1,250 = 38,750
  4. sqrt(38,750) = 196.8502
  5. x = 35.3553 + 196.8502 = 232.21 mm

The piston sits 232.21 mm from the crank center. The rod ratio is 200 / 50 = 4.00 and the stroke is 2 x 50 = 100 mm. These are the calculator's default inputs, so the result above matches the widget exactly.

Piston position at key crank angles (r = 50, l = 200)

Crank anglePosition x (mm)Note
0 deg250.00Top dead center (r + l)
45 deg232.21Default example
90 deg193.65Crank perpendicular
180 deg150.00Bottom dead center (l - r)

Stroke = TDC position minus BDC position = 250 - 150 = 100 mm = 2r.

Crank slider calculator: frequently asked questions

What is a crank slider mechanism?

A crank slider, or slider-crank, converts rotary motion at a crank into the straight-line motion of a slider (piston) along a fixed axis, or the reverse. It is the heart of every reciprocating engine and pump. A rotating crank of radius r is joined by a connecting rod of length l to the piston, and as the crank turns through an angle, the piston slides back and forth between top dead center and bottom dead center.

What is the slider-crank position equation?

The piston displacement from the crank center along the slider axis is x = r cos(theta) + sqrt(l squared minus (r sin theta) squared), where r is the crank radius, l is the connecting rod length and theta is the crank angle measured from top dead center. The square-root term is the projection of the connecting rod onto the slider axis, so it accounts for the rod swinging off-axis as the crank rotates.

What are top and bottom dead center?

Top dead center (TDC) is the crank angle of zero degrees, where the piston is at its furthest point and the displacement equals r plus l. Bottom dead center (BDC) is at 180 degrees, where the displacement is l minus r. The stroke, the total travel of the piston, is the difference between these two positions and equals twice the crank radius (2r).

Why is the connecting rod ratio important?

The rod ratio is the connecting rod length divided by the crank radius (l/r). A larger ratio makes the piston motion closer to a pure sine wave and reduces the secondary (off-axis) component of motion, which lowers vibration and side load on the cylinder wall. Short rods give more aggressive motion profiles. The exact equation on this page captures the rod ratio precisely rather than using a sine approximation.

Does this calculator give velocity or just position?

This page solves the position (displacement) of the slider for a given crank angle, which is the foundation of slider-crank analysis. Velocity and acceleration follow by differentiating the position equation with respect to time, using the crank angular speed. Every figure here is computed deterministically from the exact geometric equation, with a worked example you can follow step by step.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.