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
Elbow-Up Solution
θ1
—
—
θ2
—
—
θ1 + θ2
—
Elbow-Down Solution
θ1
—
—
θ2
—
—
θ1 + θ2
—
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
- Enter the length of the first link (L1) in any consistent unit (meters, cm, inches).
- Enter the length of the second link (L2) in the same unit.
- Enter the desired end-effector target position X and Y.
- The tool checks reachability: the target must lie within the annular workspace defined by |L1 - L2| and L1 + L2.
- Using the law of cosines, theta2 is solved from cos(theta2) = (x^2 + y^2 - L1^2 - L2^2) / (2*L1*L2).
- Theta1 is then derived from the atan2 formula, yielding two solutions: elbow-up and elbow-down.
- Both solutions are displayed numerically and rendered on a live canvas diagram.
Use cases
- Compute joint setpoints for a 2-link robotic arm reaching a target position.
- Verify IK solutions during mechanical design and workspace analysis.
- Teach and learn inverse kinematics in robotics and mechatronics courses.
- Prototype path-planning algorithms before implementing them in firmware.
- Check reachability constraints for a given link configuration.
- Compare elbow-up vs. elbow-down configurations for collision avoidance.
- Validate hand-calculated IK results against a known-correct reference.
- Explore how link length ratios affect the reachable workspace.
Frequently Asked Questions
Related tools
Last updated: 2026-05-23 ·
Reviewed by Nham Vu