2-Link Arm Inverse Kinematics Calculator

Planar arm: joint angles for a target point, with both elbow solutions and a forward-kinematics check.

Results

How it works

Conventions: planar XY, X horizontal, Y up, Z toward the viewer (right-hand rule). θ1 is measured from +X, counter-clockwise positive. θ2 is relative to link 1. Tip orientation φ = θ1 + θ2.

Inverse kinematics: cos θ2 = (x² + y² − L1² − L2²) / (2·L1·L2); θ1 = atan2(y, x) − atan2(L2·sin θ2, L1 + L2·cos θ2). The two signs of θ2 are the two elbow configurations. Reachable points lie between |L1 − L2| and L1 + L2 from the base.

Check: the angles found are put back into the forward kinematics and compared with the target. The error should be ~1e-13 mm.

Units: inputs in mm and degrees; internally SI (m, rad). For torque on each joint use the torque calculator.