Home / Science / Engineering / Control and robotics / Inverse kinematics for 2 and 3 link armsTool #637

Inverse kinematics calculator for 2-link and 3-link planar robot arms: elbow up and down, reach and joint limits

Find the joint angles that put a planar 2-link arm's tip, or a 3-link arm's tool at a given angle, on a target point. Both elbow-up and elbow-down solutions, a reach check that says why a point is out of reach, optional joint limits, a drawing of the arm and its workspace, and a batch of targets to CSV.

Keep it one tap away for everyday use.

Bookmark Inverse kinematics for 2 and 3 link arms?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Links
  2. Target
  3. Angles
  4. CSV
Nothing is uploadedWorks offline once open

Arm

Use any length unit, the same for every length and target. Each joint angle is measured from the previous link, counter-clockwise positive; joint 1 from the +x axis. The example arm is made up.

Target

Joint angles

Many targets

Download

What it does

Forward kinematics is easy: given the joint angles, add up the links to find where the tip is. Inverse kinematics is the reverse, and it is what a robot controller has to do: given where the tip should be, find the joint angles.

For a planar arm with two links the answer comes in closed form. The elbow angle follows from the law of cosines,

cos θ2 = (x² + y² − L1² − L2²) / (2 L1 L2),

and the shoulder angle from θ1 = atan2(y, x) − atan2(L2 sin θ2, L1 + L2 cos θ2). There are usually two solutions, elbow up and elbow down, and this tool gives both. For a three-link arm you also give the tool angle φ. The tool then works back from the target along the last link to the wrist point, solves the first two links for that point, and sets θ3 = φ − θ1 − θ2.

It also:

  • checks the reach: the first two links can only reach points between |L1 − L2| and L1 + L2 from the base, and the tool tells you how far out of reach a point is;
  • flags singular poses, where the arm is fully stretched or folded and the two solutions merge;
  • checks optional joint limits and shows which solution, if any, the joints can reach;
  • draws the arm, the other solution and the reachable area;
  • solves a whole list of targets, for example a path, and downloads the joint angles as CSV.

How to use it

  1. Choose 2 or 3 links and give their lengths, in any unit, the same for everything.
  2. Tick Joint limits if your joints cannot turn all the way round, and give each joint’s range. Each angle is measured from the previous link, counter-clockwise positive.
  3. Give the target x and y, and for 3 links the tool angle φ from the +x axis. Choose which solution to draw.
  4. For a path, paste or open a list of targets under Many targets and download the CSV.

Worked example

A made-up arm with L1 = 1 and L2 = 0.8 reaching for (1.2, 0.6), 1.342 from the base and well inside its reach of 0.2 to 1.8. Elbow up: θ1 = 62.956°, θ2 = −84.261°. Elbow down: θ1 = −9.826°, θ2 = 84.261°. With the example joint limits (joint 2 from −150° to 0°) only elbow up is allowed. Add a 0.3-long tool held at 30° and the wrist moves to (0.940, 0.350): elbow up gives 67.494°, −113.326° and 75.832°.

Tips

  • The two elbow angles are always equal and opposite. That is a quick check on any hand calculation.
  • Near full stretch the arm is singular: small moves of the target need large joint moves. Keep paths away from the outer edge.
  • For 3 links, a target can be in reach for one tool angle and not for another. Only the wrist point has to be in the annulus.

FAQ

What about arms that move in 3D? This tool is planar. Many arms are planar in their main joints after a base rotation: work out the base angle with atan2 and use this tool in the arm’s vertical plane.

Why does the check error show tiny numbers? It is the distance between the target and the tip computed back from the angles, so it shows round-off only.

Where the numbers come from

  • Closed-form inverse kinematics of the planar two-link arm (law of cosines and atan2) and the three-link arm with a wrist point: standard robotics, for example Craig, Introduction to Robotics: Mechanics and Control, and Spong, Hutchinson and Vidyasagar, Robot Modeling and Control (methods only).
  • The example arm and targets are made up.
  • Checked by forward-kinematics round trips and against an independent SciPy least-squares solve written for the tests.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Mass and energy balance solver #664 Describe a process flowsheet in a few lines (mixers, splitters, separators with split fractions, reactors with a conversion) and its feeds, and get every stream's component flows, a degrees-of-freedom check, a stream table and, with heat capacities, the temperatures and heat duties. Recycle loops are solved directly as one linear system. D-H forward kinematics #635 Type a robot arm's Denavit-Hartenberg table (standard or modified convention), move the joints with sliders and get every link transform, the end-effector position and orientation (roll, pitch, yaw, quaternion), the Jacobian and a 3D picture you can turn. Nothing is uploaded. PID tuning simulator #636 Pick a plant (first or second order, or any transfer function) with dead time, set the PID gains with sliders and see the closed-loop step response with rise time, overshoot, settling time and steady-state error, the controller output, the Bode plot with gain and phase margins, and Ziegler-Nichols starting values. Nothing is uploaded. State space and pole placement #638 Enter the state-space matrices A, B, C and D to get controllability and observability (matrices and ranks), the open-loop eigenvalues, the state-feedback gain K that places your chosen poles (Ackermann), an observer gain L by duality, and the closed-loop step response. Nothing is uploaded.