Inverse Kinematics 2DOF

Enter end-effector target coordinates and link lengths to compute the two joint angles of a 2-DOF planar robot arm.

Robot Parameters

Link Lengths

u
u

Target End-Effector Position

u
u

Arm Diagram

Elbow-up Elbow-down

Both solutions overlaid. Dashed circle = max reach.

Copied!

Summary

Enter end-effector target coordinates and link lengths to compute the two joint angles of a 2-DOF planar robot arm.

How it works

  1. Enter the length of the first link (L1) in any consistent unit (meters, cm, inches).
  2. Enter the length of the second link (L2) in the same unit.
  3. Enter the desired end-effector target position X and Y.
  4. The tool checks reachability: the target must lie within the annular workspace defined by |L1 - L2| and L1 + L2.
  5. Using the law of cosines, theta2 is solved from cos(theta2) = (x^2 + y^2 - L1^2 - L2^2) / (2*L1*L2).
  6. Theta1 is then derived from the atan2 formula, yielding two solutions: elbow-up and elbow-down.
  7. Both solutions are displayed numerically and rendered on a live canvas diagram.

Use cases

Frequently Asked Questions

Related tools

Last updated: 2026-05-23 · Reviewed by Nham Vu