Reciprocating motion is repeated back-and-forth travel. This calculator shows a slider-crank, in which a rotating crank and connecting rod move a piston along a straight guide. Change crank radius, rod ratio, angle and RPM to calculate stroke, position and instantaneous speed at the selected crank angle.
Reciprocating Motion Interactive Calculator
Vary crank radius, rod ratio, crank angle, and RPM to see slider-crank stroke, piston position, and instantaneous piston speed.
Equation Used
- Rigid planar crank and connecting rod with zero-offset straight slider guide.
- Constant entered crank speed for the velocity calculation.
- No acceleration load, inertia, side thrust, friction, clearance, stress or safe-speed prediction.
Output cards use the entered crank angle as a reference state. Autoplay advances the mechanism from that reference; at 0 rpm it remains stationary.
How the slider-crank moves
The crank pin travels in a circle about the fixed crankshaft bearing. A rigid connecting rod joins that pin to the piston pin. The piston guide prevents sideways motion, so the piston moves along the guide as the connecting rod changes angle.
In this zero-offset arrangement, the guide axis passes through the crank centre. At 0° the piston is at top dead centre (TDC); at 180° it is at bottom dead centre (BDC). One full crank revolution returns it to TDC. The distance between endpoints is twice the crank radius.
What the controls represent
- Crank Radius: distance from the shaft centre to the crank pin.
- Rod Ratio: rod pin-centre length divided by crank radius.
- Crank Angle: reference angle used for the output calculations.
- Speed: constant crank speed used to calculate instantaneous piston speed.
The rod length stays constant as the piston moves. The drawing illustrates ideal geometry: it has no bearing play, flexible parts, collision assessment or force model. Playback is slowed for viewing rather than running at the entered mechanical RPM.
Where this geometry is useful
Slider-crank geometry appears in piston engines, reciprocating pumps, compressors and crank-driven rams. The direction of power flow can differ: a motor may drive the crank to move a plunger, while gas pressure in an engine acts on the piston to drive the crank.
This tool helps compare stroke and piston position before adding the details of a particular machine. For a pump, for example, stroke is only one part of displacement; piston area is also needed. Actual flow, pressure, valve timing and suction performance require further information.
The RPM control lets you compare the ideal piston speed at a chosen position. It is not an operating-speed recommendation for a pump, engine or bearing.
Exact position and speed equations
Let r be crank radius, L be connecting-rod length, theta be crank angle from TDC and n be RPM. All lengths in the position equation use the same units.
Here s is displacement from TDC along the guide. With theta measured in radians, its exact derivative is:
The calculator uses millimetres for r and L, then divides the velocity result by 1,000 to display metres per second. It reports magnitude, so the speed stays nonnegative on both strokes. The input angle is converted from degrees to radians internally.
The commonly used expression r × omega × [sin(theta) + (r/(2L))sin(2theta)] is an approximation to signed velocity when the rod is long relative to the crank. The displayed speed uses the square-root expression above.
Worked example at the default settings
Use r = 50 mm, Rod Ratio = 4, theta = 90° and n = 1500 RPM.
- Dimensions: stroke is 2 × 50 = 100 mm and L = 4 × 50 = 200 mm.
- Position: q = √(200² − 50²) = 193.649 mm. Displacement from TDC is 250 − 193.649 = 56.35 mm.
- Angular speed: omega = 2π × 1500/60 = 157.080 rad/s.
- Piston speed: at 90°, cos(theta) is zero, so ds/dtheta = 50 mm/rad. The speed is 50 × 157.080/1000 = 7.85 m/s.
At the same geometry and angle, 750 RPM gives 3.93 m/s. Zero RPM gives zero speed without changing the reference position. At 0° and 180°, piston speed is zero; displacement is respectively zero and 100 mm.
The 90° result is the speed at that angle, not a claim about peak speed over the cycle. No pump pressure, cavitation margin, bearing life or permissible RPM follows from this example.
Comparing input changes
| Change | Effect in this model |
|---|---|
| Increase crank radius at fixed rod ratio | Stroke and rod length grow proportionally. At the same angle and RPM, displacement and speed also scale with radius. |
| Change rod ratio at fixed radius | Rod length and the intermediate position and speed curves change; stroke remains 2r. |
| Increase RPM at fixed geometry and angle | Instantaneous speed scales with RPM; reference displacement stays the same. |
| Change crank angle | The output cards calculate a different reference position and speed. |
A scotch yoke produces linear motion through a sliding pin and slot instead of a connecting rod. It is a different geometry. Selecting between mechanisms also requires the real loads, contact design, lubrication and space constraints; these comparisons do not predict service life.
Slider-crank questions
Why do the output cards stay at the entered crank angle during playback?
The cards calculate the reference position selected by Crank Angle. Playback moves the drawing from that reference while keeping those calculated values fixed. The live angle appears below the mechanism. Pause and change Crank Angle to calculate another position.
Does Piston Speed include direction?
No. It is the magnitude of velocity at the entered angle. The piston reverses at each endpoint, but the displayed speed is nonnegative. It is not mean piston speed or an automatically calculated peak.
Why is From TDC not half the stroke at 90 degrees?
The connecting rod is inclined at that crank position. With r = 50 mm and L = 200 mm, displacement is approximately 56.35 mm at 90 degrees, even though the full stroke is 100 mm. Finite rod length changes the position curve.
What happens at zero RPM?
Calculated speed is zero and the drawing remains at the entered reference angle. The stroke, rod length and reference displacement still describe the geometry.
Does rod ratio change stroke?
At a fixed crank radius, stroke remains 2r. Changing L/r changes rod length and the displacement and velocity curves between the endpoints. The calculator does not select a preferred ratio for strength, wear or packaging.
Can I use the speed result to predict pump flow or cavitation?
Not on its own. Flow also depends on piston area, valve behaviour and leakage; suction performance needs pressure, fluid and pipe-system information. Those quantities are not inputs here.
Is slider-crank motion sinusoidal?
For a finite rod length, its displacement contains the square-root term shown in the equation. It approaches a sinusoidal form as the rod becomes very long relative to the crank. Sinusoidal position does not mean constant acceleration.
Can this model diagnose scoring, vibration or worn bearings?
No. The calculation contains no masses, contact forces, lubrication, material properties or bearing clearances. Use the actual equipment’s inspection and service information for those questions.
Technical references
- Richard John Durley, Kinematics of Machines (1907), Cornell University Library — historical treatment of slider-crank chains, position and velocity.
- Payam Bighal, High Efficiency Heavy Duty Truck Engine (2012), Chalmers University of Technology, section 2.1 — exact slider-crank displacement, velocity and acceleration relationships.
Building or designing a mechanism like this?
Explore the precision-engineered motion control hardware used by mechanical engineers, makers, and product designers.