Slider-Crank Calculator: Piston Position, Velocity and Acceleration, Offset Slider Stroke and Time Ratio, Inverted Slider-Crank with Coriolis Acceleration, and Scotch Yoke

Solve in-line and offset slider-cranks, the inverted slider-crank and the Scotch yoke from any input. Every length takes an expression, every result shows its equations, and the mechanism exports to CAD as blocks. For four-bars, see the four-bar linkage calculator.

Inputs
Mechanism

Crank O2A drives rod AB; pin B slides on a straight path. Offset c = 0 is the in-line (engine) case.

Crank O2A carries a slider block that rides along link 4, which turns about O4. This is the quick-return shaper and the hydraulic-cylinder linkage.

The crank pin rides in a slot of the yoke, so the yoke moves in pure simple harmonic motion.

Variables (optional)

Name a value once and use it in any box below: r = 40, then 3*r. Boxes take expressions: + − * / ^, sqrt(), pi. sin, cos, tan and their inverses work in degrees.

Link Lengths
mm
mm
mm
mm
°
°

Offset c is the distance of the slider path from O2, measured to the left of the path direction.

Offset c is the distance from the line of link 4 to the slider pin A. Use 0 when the pin rides on the centre line.

Point P on the Rod
mm
°

P rides on the rod, for example its centre of mass. δ is measured counterclockwise from line AB at A. Set p = 0 to leave it out.

Known Position and Motion
°
rad/s
rad/s²
rad/s³
Assembly (branch)

Angles are measured counterclockwise from +x. Positive ω and α are counterclockwise; a positive slider speed moves along the path direction. Speeds of a length (slider, yoke) are in length units per second.

Mechanism and Results
Worked Solution, Plot and CAD Export
Worked solution: equations, matrices and numbers
Plot over a full cycle
Export to CAD
mm
mm

The block DXF holds one block per link (crank, rod, slider block, and the ground with the slider path), each drawn in its own frame. AutoCAD and SolidWorks (Insert ▸ DXF/DWG) bring each link in as a block placed at this position, ready for a layout sketch. Units are written into the file.

Reference Guide: Slider-Cranks
01

In-Line Slider-Crank: Piston Motion

Exact position

With crank a, rod b, crank angle θ and no offset, the slider sits at distance x from the crank centre:

Position \[ x = a\cos\theta + \sqrt{b^2 - a^2\sin^2\theta},\qquad \sin\theta_3 = -\frac{a}{b}\sin\theta \]
Velocity \[ \dot x = -a\omega\sin\theta - \frac{a^2\omega\sin\theta\cos\theta}{\sqrt{b^2 - a^2\sin^2\theta}} \]

Stroke is 2a. The dead centres are at θ = 0° and 180°.

Series form (engine work)

Expanding the square root and keeping the first harmonic of a/b gives the forms used in engine dynamics, at constant ω:

Series form \[ \dot x \approx -a\omega\left(\sin\theta + \frac{a}{2b}\sin 2\theta\right),\qquad \ddot x \approx -a\omega^2\left(\cos\theta + \frac{a}{b}\cos 2\theta\right) \]
The calculator uses the exact loop solution. When the slider-crank is in-line, the worked solution prints the series value next to the exact one.
02

Offset Slider: Stroke and Quick Return

Stroke

With offset c, the dead centres are where crank and rod line up. The slider then sits at

Dead centres \[ x_{max} = \sqrt{(a+b)^2 - c^2},\qquad x_{min} = \sqrt{(b-a)^2 - c^2},\qquad \text{stroke} = x_{max} - x_{min} \]

The crank turns fully only when b ≥ a + |c|.

Time ratio

The two strokes take different crank angles, so one is faster. That is the quick-return effect:

Time ratio \[ \beta = \sin^{-1}\frac{c}{b-a} - \sin^{-1}\frac{c}{b+a},\qquad Q = \frac{180^\circ + \beta}{180^\circ - \beta} \]
An in-line slider-crank has Q = 1: both strokes take 180° of crank turn.
03

Inverted Slider-Crank and Coriolis Acceleration

The loop

Here the slider block rides on a turning link 4, and its distance b along that link changes. The unknowns are θ4 and b:

Vector loop \[ a e^{i\theta_2} - b e^{i\theta_4} - c\, e^{i(\theta_4+90^\circ)} - d e^{i\theta_1} = 0 \]

Differentiating twice gives the terms of a point that moves along a turning link.

Coriolis term
Slider acceleration \[ \mathbf a_A = \mathbf a_{A'} + \ddot b\,\hat u_4 + 2\omega_4\dot b\,(i\hat u_4) \]

A′ is the point of link 4 under the slider and û4 is the unit vector along link 4. The last term, 2ω4ḃ, is the Coriolis acceleration. It acts across link 4.

Exam questions on shapers and hydraulic cylinders often hinge on this term. The results list it, and the worked solution shows where it enters the right-hand side.
04

Scotch Yoke

Pure harmonic motion

The crank pin slides in a slot of the yoke, so the yoke follows the pin's horizontal position exactly:

Motion \[ x = a\cos\theta,\qquad \dot x = -a\omega\sin\theta,\qquad \ddot x = -a\omega^2\cos\theta \]
Compared with a slider-crank

It is the limit of the slider-crank as the rod gets infinitely long: the cos 2θ term disappears. Stroke is 2a, and both strokes take 180° of crank turn.

The pin also slides along the slot at a·ω·cosθ, so the slot carries wear and side load every cycle.
05

Sources

R. L. Norton, Design of Machinery, McGraw-Hill: slider-crank and inverted slider-crank position, velocity and acceleration (chapters 4, 6 and 7) and the series form of piston motion (chapter 13, engine dynamics).

J. Angeles and S. Bai, Kinematics of Mechanical Systems, MECH 541 lecture notes, McGill University: vector-loop analysis of planar linkages.

Every rate is also checked by the site's tests against finite differences of the position solution, for every input, both branches and many proportions.