Forward Kinematics Calculator (2-Link Planar Arm)

Compute end-effector position from joint angles for a 2-link planar robot arm.
Pair with inverse kinematics for full motion-planning workflows.

End-Effector Position

What forward kinematics solves

A robot arm has joints (rotating motors, sometimes sliders) connecting rigid links. Forward kinematics is the easier of the two kinematics directions: given the joint angles, compute where the end-effector (the gripper tip or tool point) actually is. The reverse problem, inverse kinematics, is harder because multiple joint configurations can put the gripper at the same point.

For a 2-link planar arm rotating in a flat plane around the base, with link lengths L₁ and L₂ and joint angles θ₁ (shoulder) and θ₂ (elbow, measured relative to the upper arm), the end-effector position is:

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

The end-effector orientation (the direction the gripper points, in the plane) is simply the sum of the two joint angles:

φ_end = θ₁ + θ₂

These three equations completely describe the position and pose of a 2-link arm. For a 3-link planar arm you would add a third term, and for a 6-DOF industrial arm you would chain together six 4×4 Denavit-Hartenberg transformation matrices.

Why a 2-link planar arm is the standard teaching example

Real industrial robots have 6 or 7 degrees of freedom and require Denavit-Hartenberg parameters to compute their kinematics. The math is the same in principle but the bookkeeping explodes. The 2-link planar case captures the essential ideas with the smallest possible complexity:

  • Multiple links and joints
  • Each link extends from the previous one
  • Angles compound (θ₁ + θ₂ for the second link)
  • Reachable workspace is a region of the plane (an annulus between |L₁ − L₂| and L₁ + L₂)
  • Two solutions exist for most reachable points (elbow up vs elbow down configurations)

Once you understand the 2-link arm, the generalization to 6 DOF is mechanical (4×4 transformation matrices replace the 2×2 rotations) but conceptually identical.

The Denavit-Hartenberg parameters

For a multi-joint arm, each link has four DH parameters: (θ, d, a, α), where:

  • θ = joint angle, the variable for revolute joints (or the only fixed parameter for prismatic joints)
  • d = link offset (translation along the joint’s z-axis), the variable for prismatic joints
  • a = link length (translation along the previous link’s x-axis after rotation)
  • α = link twist (rotation about the previous link’s x-axis)

The 4×4 homogeneous transformation matrix for joint i:

T_i = [ cos(θ) −sin(θ)cos(α) sin(θ)sin(α) a·cos(θ) ] [ sin(θ) cos(θ)cos(α) −cos(θ)sin(α) a·sin(θ) ] [ 0 sin(α) cos(α) d ] [ 0 0 0 1 ]

The total transformation from base to end-effector is the product T = T₁ T₂ T₃ … T_n. The position of the end-effector in the base frame is the last column of T (rows 1 to 3). The orientation comes from the upper-left 3×3 sub-matrix.

For a 2-link planar arm with all α = 0 and all d = 0, the DH math collapses to the simple 2D formulas at the top.

Worked example: a SCARA-style 2-link arm

L₁ = 0.5 m, L₂ = 0.3 m. The arm starts straight at θ₁ = θ₂ = 0, with end-effector at (0.8, 0).

Rotate the shoulder to θ₁ = 90° (upward) keeping θ₂ = 0:

  • x = 0.5 cos(90°) + 0.3 cos(90°) = 0 + 0 = 0
  • y = 0.5 sin(90°) + 0.3 sin(90°) = 0.5 + 0.3 = 0.8
  • End-effector is at (0, 0.8), pointing straight up.

Bend the elbow to θ₂ = −90° (forearm folds forward from the upper arm):

  • x = 0.5 cos(90°) + 0.3 cos(90° + (−90°)) = 0 + 0.3 cos(0°) = 0 + 0.3 = 0.3
  • y = 0.5 sin(90°) + 0.3 sin(0°) = 0.5 + 0 = 0.5
  • End-effector is at (0.3, 0.5), gripper pointing horizontally (φ = 0°).

Each joint angle change moves the end-effector predictably in the plane.

Reachable workspace

A 2-link arm with link lengths L₁ and L₂ can reach any point within an annulus centered on the base. The outer boundary is when both links extend straight outward: radius = L₁ + L₂. The inner boundary is when the second link folds back on the first: radius = |L₁ − L₂|. Points outside this annulus are unreachable.

For L₁ = 0.5, L₂ = 0.3: outer reach 0.8 m, inner unreachable disk of 0.2 m radius. A point at distance 0.1 from base cannot be reached by this arm because the forearm cannot bend back tightly enough.

If L₁ = L₂ (equal-length links), the inner boundary collapses to zero and the arm can reach all the way to its base. This is sometimes called a “full-shoulder” design.

The two-solution problem

Most reachable points (except boundary points) have two valid joint configurations: elbow up and elbow down. Both put the gripper at the same (x, y), but the elbow joint is on opposite sides. This is the “inverse kinematics multi-solution” problem.

Forward kinematics does not have this ambiguity. Given specific joint angles, there is exactly one end-effector position. The ambiguity arises only when going backwards (from position to angles), which is why inverse kinematics is harder.

Where this is used

Industrial pick-and-place robots use forward kinematics to convert motor positions into Cartesian gripper coordinates, for collision checking and motion planning. Surgical robots compute the tool tip position from instrument-arm joint angles thousands of times per second to display the location to the surgeon.

In video game physics, character animation, and computer graphics, forward kinematics is what skeletal-animation rigs use: a hierarchy of bones rotated by user input, with each bone position computed as the parent’s rotation cascades down the chain. Inverse kinematics solvers in animation are slower and more iterative; forward is the cheap default.

In computer-aided design and 3D simulation, FK lets you preview where a manipulator will go before committing motor commands. It is the building block for inverse kinematics solvers (Jacobian methods iteratively use FK at slightly-shifted joint angles to compute partial derivatives).

Companion calculator

For the inverse problem (compute joint angles to reach a target Cartesian point), see the Inverse Kinematics Calculator. The two pair naturally: forward gives the workspace; inverse plans motion to specific targets.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.