Home / Robotics & Controls / Kinematics / Inverse Kinematics Elbow Angle (2-Link Planar Manipulator)

Formula & Calculator

Inverse Kinematics Elbow Angle (2-Link Planar Manipulator)

Inverse kinematics does the opposite of forward kinematics: given where you want the hand to be, what joint angles do you need? This formula gives the elbow angle for a two-link planar arm using the law of cosines. For example, if you want the hand at a certain x and y position, this tells you how much to bend the elbow. There are usually two solutions (elbow up or elbow down). It is essential for robot path planning and pick-and-place tasks.

Robotics Kinematics Calculator
VORZEP · ROBOTICS & KINEMATICS TOOLS

Inverse Kinematics Calculator — 2-Link Planar Manipulator

Solve the classic 2-link inverse kinematics relation θ₂ = acos( (x² + y² − L₁² − L₂²) / (2·L₁·L₂) ) for joint angles, target position, or link length — with a live arm visualization, workspace analysis, both elbow configurations, and companion manipulability metrics.

θ₂ = acos( (x² + y² − L₁² − L₂²) / (2·L₁·L₂) ) · θ₁ = atan2(y,x) − atan2(L₂ sin θ₂, L₁ + L₂ cos θ₂)
Solve for
Manipulator presets
First Link Length (L₁) Length of the proximal (shoulder-to-elbow) link, in metres. This is the base link — its length determines the maximum reach along with L₂, and its ratio to L₂ shapes the workspace annulus.
m
Link length must be greater than zero.
Second Link Length (L₂) Length of the distal (elbow-to-tip) link, in metres. Together with L₁ it determines the maximum reach (L₁+L₂) and the size of the inner unreachable void (|L₁−L₂|).
m
Link length must be greater than zero.
Target X Coordinate (x) X-coordinate of the desired end-effector position, in metres. Reachability requires |L₁ − L₂| ≤ √(x² + y²) ≤ L₁ + L₂.
m
X must be a finite number.
Target Y Coordinate (y) Y-coordinate of the desired end-effector position, in metres. Positive y is "up". The target's distance from the base is r = √(x² + y²); it must satisfy |L₁ − L₂| ≤ r ≤ L₁ + L₂.
m
Y must be a finite number.
Shoulder Angle (θ₁) Angle of the first (proximal) link measured from the +x axis, in degrees. Positive counter-clockwise. In IK mode this is computed from the target position: θ₁ = atan2(y,x) − atan2(L₂ sin θ₂, L₁ + L₂ cos θ₂).
deg
θ₁ must be a finite number.
Elbow Angle (θ₂) Relative angle between the second link and the extension of the first, in degrees. θ₂ = 0 means fully extended; θ₂ = ±180° means fully folded. Positive is elbow-down, negative is elbow-up — both give the same tip position.
deg
θ₂ must be a finite number.
ELBOW ANGLE (θ₂)
86.18 °
θ₁ = −8.50° · r = 0.4031 m · w = 0.0748
REACHABLE — WELL-CONDITIONED
θ₂ = acos( (x² + y² − L₁² − L₂²) / (2·L₁·L₂) )
Step-by-step solution
θ₂ vs. reach r
Elbow angle vs. distance Current operating point
θ₁ vs. reach r (current direction)
Shoulder angle vs. r Current operating point
Manipulability w = |L₁·L₂·sin θ₂|
Manipulability curve Singularities Current operating point
Sensitivity
Companion manipulator metrics
Two-link planar manipulator — live workspace and configuration
WORKSPACE · BASE AT ORIGIN · L₁ AND L₂ DEFINE THE ANNULUS +x +y θ₁ θ₂ BASE (0,0) TIP LIVE VALUES L₁ — L₂ — Target (x, y) — Reach r — θ₁ (shoulder) — θ₂ (elbow) — Manipulability w — Elbow configuration — Annulus: |L₁−L₂| ≤ r ≤ L₁+L₂ θ₂ = acos( (x² + y² − L₁² − L₂²) / (2·L₁·L₂) )
Link 1 (proximal) Link 2 (distal) Alternative elbow configuration (ghost) Reach line · angle arcs End-effector tip
What the 2-link IK relation really measures
θ₂elbow angle
=
acosinverse cosine
(
(r² − L₁² − L₂²) / (2 L₁ L₂)law of cosines
)

It is the law of cosines in disguise

The formula for θ₂ comes directly from the law of cosines applied to the triangle formed by the two links and the line from base to target. The three sides are L₁, L₂ and r = √(x² + y²). Solving for the angle opposite the r side gives cos θ₂ = (r² − L₁² − L₂²)/(2 L₁ L₂) — exactly the argument of the arccos. This is why the formula is exact, requires no iteration, and can be evaluated in closed form in microseconds on any microcontroller.

Two configurations, one target

For any reachable target there are exactly two distinct joint configurations that place the end-effector at the same point: the "elbow-down" (θ₂ > 0) and "elbow-up" (θ₂ < 0) solutions, which are mirror images across the line from base to target. Both are valid IK solutions; the choice between them depends on obstacles, joint limits, and desired manipulability.

Reachability is a hard geometric bound

The target must lie within the annular workspace bounded by the circles of radius |L₁ − L₂| (inner) and L₁ + L₂ (outer). If r exceeds L₁ + L₂, the target is simply too far. If r is less than |L₁ − L₂|, the target lies inside the inner void — the arm cannot reach into its own "elbow circle". The argument of the arccos being outside [−1, +1] is exactly the algebraic signature of these two geometric failures.

Manipulability quantifies conditioning

The Jacobian determinant of the 2-link arm is w = |L₁ L₂ sin θ₂|, called the manipulability measure. It is zero at the two singular configurations θ₂ = 0 (fully extended) and θ₂ = ±180° (fully folded), where the arm loses the ability to move the tip in certain directions. The maximum manipulability is at θ₂ = ±90°, where the arm is "square" and can move the tip freely in every direction.

How to Use This Calculator

The 2-link IK relation links six quantities: L₁, L₂, x, y, θ₁, and θ₂. Pick which one you want the tool to solve, then fill in the others.

1. Choose what to solve for

Pick θ₂ (elbow angle, the classic IK), θ₁ (shoulder angle), x or y (forward kinematics from the angles). When solving for θ₂, the tool also computes θ₁ as a companion; when solving for x or y, the other coordinate is computed too.

2. Start from a manipulator preset

Presets cover the practical range: small educational arms, SCARA-style arms, human-arm proportions, industrial manipulators, and singular cases like the fully-extended reach limit and the inner-void boundary.

3. Watch for reachability

If your target lies outside the annulus |L₁ − L₂| ≤ r ≤ L₁ + L₂, the IK has no solution and the argument of the arccos will fall outside [−1, +1]. The calculator clips the value to ±1 for display and flags the target as unreachable.

4. Pick the right elbow configuration

The sign of θ₂ selects between two mirror-image solutions: positive is "elbow-down", negative is "elbow-up". The companion panel lists both solutions with their θ₁ and manipulability so you can pick the better one.

5. Read the result and verdict

The result card shows the solved value with the companion metrics — reach r, the other joint angle, manipulability w. A colour-coded verdict classifies the configuration from near-singular through well-conditioned.

6. Switch to Advanced for depth

Advanced mode adds charts of θ₁ vs. reach and manipulability vs. θ₂, a sensitivity panel, and a companion metrics panel including both IK solutions, both FK verifications, and reach ratios.

What This Tool Offers

Built around the classic 2-link inverse kinematics relation θ₂ = acos((x²+y²−L₁²−L₂²)/(2L₁L₂)), the closed-form solution at the heart of every planar robot arm.

Four-way solving

Solve for elbow angle, shoulder angle, or either coordinate of the target. Switch between IK and FK modes freely.

Live workspace and arm

A to-scale diagram showing the annular workspace, both elbow configurations (primary + ghost), the reach line, angle arcs, and the target crosshair — all updated live.

Reachability verdict

Each result is classified by proximity to singular configurations — fully extended, fully folded, or well-conditioned — with a colour-coded warning.

Both IK solutions

Every IK computation reports both the elbow-down and elbow-up solutions with their respective shoulder angles, so you can choose the better configuration.

Manipulability metric

The Jacobian determinant w = |L₁ L₂ sin θ₂| is reported and plotted, showing how well-conditioned the arm is and where the singularities lie.

Reference tables

Typical robot arm parameters, IK formula summary, and a full variable reference with unit conversion notes.

Reference Tables & Conversions

An angle converter, a link length converter, and typical 2-link manipulator parameters.

Angle & length converter

°
rad
rev
m
mm
in
= 86.18° = 1.5041 rad = 0.23939 rev · 0.30 m = 300 mm = 11.811 in

IK Solutions for the Current Configuration

Both valid IK solutions for the current target (if reachable). Values in degrees.

Configurationθ₁ (shoulder)θ₂ (elbow)ManipulabilityNotes
Click Calculate to populate both IK solutions

Typical 2-Link Manipulator Parameters

Representative values. Real robots also include joint limits, link offsets, and base transforms.

PlatformL₁ (m)L₂ (m)Max reach (m)Inner void (m)Typical use
Educational mini-arm0.100.100.200.00Classroom, hobby robotics
SCARA-style0.300.250.550.05Assembly, pick-and-place
Human arm (upper+fore)0.300.270.570.03Ergonomic modelling
Dobot Magician0.200.200.400.00Desktop robotics, education
UR3e0.240.240.500.00Collaborative, tabletop
UR5e (2-link slice)0.420.390.850.03Industrial collaborative
KUKA KR6 (2-link slice)0.600.551.150.05Industrial 6-axis arm
Large gantry arm1.501.202.700.30Palletising, welding

Variable Reference

SymbolMeaningTypical rangeUnits
L₁First link (proximal) length0.05 – 3m
L₂Second link (distal) length0.05 – 3m
x, yTarget coordinates of the end-effector−(L₁+L₂) – +(L₁+L₂)m
rDistance from base to target = √(x²+y²)|L₁−L₂| – L₁+L₂m
φDirection to target = atan2(y, x)−180 – +180deg
θ₁Shoulder angle (link 1 from +x)−180 – +180deg
θ₂Elbow angle (link 2 relative to link 1)−180 – +180deg
wManipulability = |L₁ L₂ sin θ₂|0 – L₁·L₂m²

What Does the 2-Link Inverse Kinematics Relation Measure?

Inverse kinematics answers the question: given a desired position for the robot's end-effector, what joint angles place it there? For a planar 2-link arm the answer is a pair of angles (θ₁, θ₂) that can be computed in closed form from the target position (x, y) and the link lengths (L₁, L₂). This is the simplest nontrivial IK problem, and it serves as the foundation for every real robot's kinematic solver — because even a 6-axis industrial arm is usually decomposed into a 3-link position chain (solved by a variant of the 2-link formula) and a 3-link orientation chain (solved by a separate set of geometric relations).

The formula for θ₂ comes from the law of cosines. Consider the triangle formed by the two links and the virtual line of length r = √(x² + y²) drawn from base to target. The three sides of this triangle are L₁, L₂, and r, and the angle opposite r is π − θ₂ (or θ₂ itself, depending on the internal-vs-external convention). Applying the law of cosines gives cos θ₂ = (r² − L₁² − L₂²)/(2 L₁ L₂) — exactly the argument of the arccos in the formula.

Inverse Kinematics Formula

The defining relation for the elbow angle is:

θ₂ = acos( (x² + y² − L₁² − L₂²) / (2·L₁·L₂) )

Once θ₂ is known, the shoulder angle follows from:

θ₁ = atan2(y, x) − atan2( L₂ sin θ₂, L₁ + L₂ cos θ₂ )

And the forward kinematic check verifies the solution:

x = L₁ cos θ₁ + L₂ cos(θ₁ + θ₂)
y = L₁ sin θ₁ + L₂ sin(θ₁ + θ₂)

Companion geometric quantities:

Reach: r = √( x² + y² )
Direction to target: φ = atan2( y, x )
Maximum reach: rmax = L₁ + L₂
Minimum reach: rmin = | L₁ − L₂ |
Reachability: rmin ≤ r ≤ rmax
Manipulability: w = | L₁ L₂ sin θ₂ |

Inverse Kinematics Variables

SymbolMeaningNotes
L₁First link lengthProximal (base-to-elbow) link
L₂Second link lengthDistal (elbow-to-tip) link
x, yTarget coordinatesPosition of the end-effector relative to the base
rReachDistance from base to target = √(x²+y²)
φBearingDirection from base to target = atan2(y, x)
θ₁Shoulder angleAbsolute orientation of link 1
θ₂Elbow angleRelative orientation of link 2 with respect to link 1
wManipulabilityJacobian determinant; equals zero at singularities

How Each Variable Affects the Solution

The elbow angle θ₂ depends only on the reach r and the two link lengths. As r increases from rmin to rmax, θ₂ decreases monotonically from 180° (arm fully folded) to 0° (arm fully extended). At the two endpoints of this range the arm is at a singularity — the Jacobian determinant vanishes and the inverse kinematics loses rank. In the middle, at rmid = √(L₁² + L₂²), the elbow angle passes through 90°, which is generally the best-conditioned configuration.

The shoulder angle θ₁ combines the bearing φ with a correction ψ = atan2(L₂ sin θ₂, L₁ + L₂ cos θ₂) that accounts for how the elbow is bent. When θ₂ = 0 (fully extended), ψ = 0 and θ₁ = φ. When θ₂ = ±90°, ψ takes its maximum value. The two signs of θ₂ give the two mirror-image configurations.

Inverse Kinematics Calculation Examples

Given: L₁ = 0.30 m, L₂ = 0.25 m, target (0.35, 0.20) m — solve for θ₂ and θ₁
r² = 0.35² + 0.20² = 0.1625
L₁² + L₂² = 0.09 + 0.0625 = 0.1525
2 L₁ L₂ = 0.15
cos θ₂ = (0.1625 − 0.1525) / 0.15 = 0.06667
θ₂ = acos(0.06667) = 86.18° (elbow-down)
φ = atan2(0.20, 0.35) = 29.74°
ψ = atan2(0.25 sin 86.18°, 0.30 + 0.25 cos 86.18°) = 38.24°
θ₁ = 29.74° − 38.24° = −8.50°
Alternative (elbow-up): θ₂ = −86.18°
ψ = atan2(−0.24944, 0.31667) = −38.24°
θ₁ = 29.74° − (−38.24°) = 67.98°
Fully extended (singular): target at (0.55, 0) m
r = 0.55 = L₁ + L₂ → cos θ₂ = 1 → θ₂ = 0°
θ₁ = 0°
Manipulability w = |L₁ L₂ sin 0°| = 0 (singular)
Forward kinematics check: θ₁ = −8.50°, θ₂ = 86.18°, L₁ = 0.30, L₂ = 0.25
x = 0.30 cos(−8.50°) + 0.25 cos(77.68°) = 0.2967 + 0.0533 = 0.350 ✓
y = 0.30 sin(−8.50°) + 0.25 sin(77.68°) = −0.0443 + 0.2443 = 0.200 ✓
Unreachable target: (1.00, 0) with L₁ = 0.30, L₂ = 0.25
r = 1.00, rmax = 0.55 → r > rmax
cos θ₂ = (1.00 − 0.1525) / 0.15 = 5.65 ≫ 1 → no solution

Frequently Asked Questions

Because the law of cosines gives cos θ₂ = (r² − L₁² − L₂²)/(2 L₁ L₂), and the arccos returns a value in [0, π]. But the equation cos θ₂ = c has two solutions in [−π, +π]: θ₂ = +acos(c) and θ₂ = −acos(c). Both give the same r, so both place the tip at the same distance from the base. Combined with the corresponding θ₁ values, they form two mirror-image configurations — the "elbow-down" and "elbow-up" solutions.

The manipulability w = |L₁ L₂ sin θ₂| is the magnitude of the Jacobian determinant of the arm's velocity mapping. A large determinant means small joint motions produce large, well-spread tip motions in all directions. When w = 0 (at θ₂ = 0 or ±180°), the Jacobian is singular: joint velocities of a certain direction produce zero tip velocity, and the inverse mapping from desired tip velocity to joint velocities blows up.

Compute the reach r = √(x² + y²) and compare it to the two critical distances: rmin = |L₁ − L₂| and rmax = L₁ + L₂. If r > rmax, the target is beyond the arm's maximum extension. If r < rmin, the target is inside the inner void. Only when rmin ≤ r ≤ rmax does a solution exist.

It depends on the task. Three common criteria: (1) Obstacle avoidance — pick the configuration that keeps the links away from obstacles. (2) Manipulability — pick the configuration with higher w = |L₁ L₂ sin θ₂|. (3) Joint limits — pick the configuration where both θ₁ and θ₂ are within the physical limits of the actuators.

Not directly, but it can be extended. For a 3-link planar arm the tip position has two equations (x, y) and three unknowns (θ₁, θ₂, θ₃), so the problem is underdetermined. Real solvers either fix one joint angle and solve the remaining 2-link problem, or use a redundancy-resolution criterion (minimise joint motion, maximise manipulability, avoid obstacles) to pick one solution.

At θ₂ = 0° (fully extended), the arm is straight and can only produce tip motion perpendicular to its length — motion along the length is impossible. The Jacobian determinant vanishes and the inverse velocity mapping is singular. At θ₂ = ±180° (fully folded), the same loss of rank occurs. Position IK still has a unique solution at the singularity, but velocity IK fails and must be handled specially.

When L₁ = L₂, the inner void has zero radius (rmin = 0), so the workspace is a full disk of radius 2L₁ — the arm can reach every point within that disk, including the base itself. This maximises the reachable area for a given total link length. The trade-off is that the arm passes through the fully-folded singularity at the exact centre of its workspace.

Real robot joints have finite ranges — typically ±180° for a revolute joint, or less when cables and hoses limit motion. The IK formula gives the geometric solution; you must then check that both θ₁ and θ₂ fall within the allowed ranges. If they don't, the other elbow configuration may work, or the target may be geometrically reachable but kinematically infeasible.

Calculating...

Variables

Symbol Quantity Unit
theta2 Required elbow joint angle degrees
x, y Target end-effector coordinates m
L1, L2 Lengths of the first and second links m

What it means

For a two‑link planar arm, this formula gives the elbow angle θ2 (the angle between the two links) needed to reach a given end‑effector position (x, y). It is derived from the law of cosines. The equation gives two possible solutions (elbow‑up/down), which must be chosen based on configuration. This is a key step in inverse kinematics, which is used for control: given a desired end‑effector position, compute the joint angles to achieve it. Inverse kinematics is essential for robot programming and path planning. Understanding this helps in solving more complex inverse problems using numerical methods.

Worked example

Inverse Kinematics Elbow Angle – Two Detailed Examples

Real‑World
Scenario: A 2‑link robot with link lengths L1 = 1 m and L2 = 1 m needs to reach a target at (x, y) = (1, 1) m. Using the inverse kinematics formula, the elbow angle θ2 = arccos((x² + y² - L1² - L2²) / (2·L1·L2)) = arccos((1+1-1-1)/(2)) = arccos(0) = 90°. This gives the elbow angle, which is then used to compute θ1 and plan the robot's posture to reach the target. The robot controller uses this to generate joint commands.
ParameterValue
L1 (m)1
L2 (m)1
x (m)1
y (m)1
1x² + y² = 1 + 1 = 2
2cos(θ2) = (2 - 1 - 1) / (2×1×1) = 0
3θ2 = arccos(0) = 90°
Result 90° ✓ Elbow angle
Scenario: A robot with L1 = 1 m and L2 = 1 m is tasked to reach (x, y) = (1.5, 0.5) m. The inverse kinematics gives cos(θ2) = (1.5² + 0.5² - 1 - 1) / 2 = (2.25 + 0.25 - 2) / 2 = 0.5/2 = 0.25, so θ2 = arccos(0.25) ≈ 75.5°. The engineer uses this to calculate the required joint angles and verify that the target is within the robot's reachable workspace. This is crucial for collision‑free path planning.
ParameterValue
L11
L21
x1.5
y0.5
1x² + y² = 2.25 + 0.25 = 2.5
2cos(θ2) = (2.5 - 2) / 2 = 0.25
3θ2 = arccos(0.25) ≈ 75.5°
Result 75.5° ✓ Elbow angle
Insight: Inverse kinematics determines joint angles from a desired end‑effector position. The elbow angle is derived from the law of cosines. Two solutions (elbow up/down) are possible, and the choice depends on the configuration.

Common mistakes

  • Inverse kinematics elbow angle: θ2 = acos((x²+y² − L1² − L2²) / (2·L1·L2)).
  • Argument of acos: Must be between −1 and 1 – otherwise the point is unreachable.
  • Two solutions: acos gives the positive angle – the negative angle corresponds to the other elbow configuration.
  • Units: x, y, L1, L2 in consistent units; θ2 in radians.
  • Singularity: When the denominator is zero (L1=0 or L2=0) – not realistic for a robot.

Applications

Inverse kinematics for a 2‑link planar manipulator, θ₂ = arccos((x² + y² − L₁² − L₂²)/(2·L₁·L₂)), computes the required joint angles for a given end‑effector position. This is essential for real‑time robot control, as it allows the robot to move to desired Cartesian points. Engineers use inverse kinematics to position the end‑effector accurately for tasks such as welding, assembly, and painting. It also guides trajectory planning and obstacle avoidance. By solving for the elbow angle, they can choose between multiple configurations (elbow‑up/elbow‑down). This formula is the basis for more advanced methods like analytical and numerical IK for redundant manipulators. Understanding inverse kinematics is crucial for robotic automation.

  • Real‑time positioning control of robot arms
  • Task space planning and path generation
  • Obstacle avoidance and configuration selection
  • Calibration and error compensation in robots
  • Educational insight into kinematic redundancy

Suggest an improvement

Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.

Page details

1,208

Views
  • Published July 13, 2026
  • Last updated September 7, 2026