ToolSphere

Forward Kinematics 2R Arm Simulator

Robotics

Calculate a 2-link planar robot arm position from link lengths and joint angles. Move the sliders, watch the arm and copy X/Y coordinates in mm.

Type the two arm lengths and move the angle sliders. The answer is where the arm tip ends up.

Joint angles

Base angle (θ1)45°
Elbow angle (θ2)45°

The arm tip ends up at

Tip X70.71 mm
Tip Y150.71 mm

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use Forward Kinematics 2R Arm Simulator

  1. 1Enter the first and second link lengths in millimetres; the interface keeps each link at least 10 mm long.
  2. 2Set the base angle with the θ1 slider, measured from the positive horizontal axis.
  3. 3Set the elbow angle with the θ2 slider, measured relative to the first link.
  4. 4Watch the arm drawing and read the end-effector X and Y coordinates in millimetres.
  5. 5Copy the result or switch to inverse kinematics when you know the target position and need joint angles.

About Forward Kinematics 2R Arm Simulator

Calculate the position of a two-link robot arm

This forward kinematics calculator finds the tip position of a planar arm with two rotating joints. Enter the link lengths, move the base and elbow angle sliders, and the drawing updates with the end-effector coordinates. It is useful for checking a robotics assignment, understanding relative joint angles or exploring the workspace of a small tabletop arm.

The forward tab models a 2R arm: two revolute joints moving in one plane. Length inputs and the reported X/Y position use millimetres. The diagram shows the base, elbow and tip; its scale adjusts to the link lengths so the arm stays visible. Use the numerical coordinates for measurements rather than estimating distances from the drawing on your screen.

The tool also has separate inverse-kinematics, holding-torque and DH sections. These solve different parts of an arm problem. The forward view itself uses two links and two joint angles; it does not provide a general spatial robot or a three-link forward input panel.

Understand the joint angle convention

The base angle θ1 is measured counterclockwise from the positive X axis. The elbow angle θ2 is measured relative to the direction of the first link. Therefore the second link's direction relative to the fixed axes is θ1 + θ2. A zero elbow angle means the two links continue in a straight line.

This convention is the most important detail when checking a hand calculation. If your sketch gives the second link's absolute direction, convert that direction into an angle relative to link one before entering it. Using two absolute headings as joint angles makes the tool add the base rotation twice.

Positive Y points upward in the mathematical coordinates. The browser drawing converts these coordinates to its screen system internally. A tip drawn above the base therefore has a positive Y result, even though raw screen pixel positions increase downward. Negative slider values rotate clockwise relative to the corresponding reference direction.

The forward kinematics formulas

For link lengths L1 and L2, the elbow coordinates are x1 = L1 cos θ1 and y1 = L1 sin θ1. The tip coordinates are x = L1 cos θ1 + L2 cos(θ1 + θ2) and y = L1 sin θ1 + L2 sin(θ1 + θ2). Each term is the horizontal or vertical projection of a link.

The sliders are in degrees. The calculation library converts angles into radians before evaluating sine and cosine. If you reproduce the formulas in a programming language, check the trigonometric function's expected unit. A degree/radian mismatch can produce a plausible-looking number with the wrong position.

These formulas assume rigid links and ideal revolute joints. They do not include joint backlash, bending, motor calibration offsets or a gripper offset beyond the second link. If a physical tool extends past that endpoint, define the geometry consistently before comparing a measured tip position with this result.

Worked example using the default pose

The default link lengths are L1 = 100 mm and L2 = 80 mm, with θ1 = 45° and θ2 = 45°. Because the elbow angle is relative, the second link points at 90° to the positive X axis. The values below were computed with the same planar-arm library used by the simulator.

Point or setting X coordinate Y coordinate
Base 0 mm 0 mm
Elbow at the default pose 70.71 mm 70.71 mm
Tip at the default pose 70.71 mm 150.71 mm
Tip with θ1 = 0°, θ2 = 0° 180 mm 0 mm
Tip with θ1 = 0°, θ2 = 90° 100 mm 80 mm
Tip with θ1 = 0°, θ2 = 180° 20 mm approximately 0 mm

The fully folded case illustrates why the endpoint does not necessarily return to the base: the link lengths differ. Tiny nonzero values near a theoretical zero can arise from floating-point trigonometry. The result display rounds coordinates to two decimal places, which is adequate for comparing these examples.

Read the reachable workspace

For ideal links with unrestricted rotation, the tip's distance from the base lies between |L1 − L2| and L1 + L2. With the example lengths, those distances are 20 mm and 180 mm. The outer limit occurs when the arm is straight; the inner limit occurs when the links fold back against each other.

A physical arm may have a smaller workspace because of joint stops, collisions, cable routing and nearby objects. The drawing does not detect those restrictions. Treat its poses as geometric configurations rather than proof that your hardware can safely move through the same path.

If your assignment starts with a desired X/Y position, switch to the inverse kinematics calculator. That tool checks reachability and offers elbow branches. Forward kinematics instead starts with known angles and produces a single corresponding position.

Check your result before using it

Keep every length in the same unit and enter millimetres in this interface. The inputs enforce a minimum link length of 10 mm, so a smaller entered value will be adjusted. Measure links between their joint axes rather than along the outside edge of a bracket or servo housing.

Check the zero pose first, then bend the elbow while keeping the base fixed. This separates a coordinate-convention mistake from an arithmetic mistake. Copy the result when recording an experiment: the copied text includes link lengths, both joint angles and the calculated endpoint.

Position alone does not tell you whether the joints can hold the load. Continue with the robotic joint torque calculator when choosing actuators. For coordinate frames and transformation matrices, use the DH parameters calculator and the DH parameters guide.

Guides and tutorials

Frequently asked questions

What does a forward kinematics calculator find?

It calculates an end-effector position from known link lengths and joint angles. This page handles a two-link planar arm with two revolute joints.

Is the elbow angle relative or absolute?

The elbow angle is relative to the first link. The second link therefore has an absolute heading equal to the base angle plus the elbow angle.

What units does this arm simulator use?

Enter both link lengths in millimetres and use degrees for the sliders. The end-effector coordinates are also reported in millimetres.

Why is my result different from my drawing?

Check whether your second angle is measured from the first link or from the fixed horizontal axis. Also check length units, rotation direction and whether your own calculation expects degrees or radians.

Can I calculate a three-link arm here?

The forward tab has two link inputs and two joint angles. A separate inverse tab supports a three-link planar problem with a required tool angle, but that is a different input mode.

What happens when both joint angles are zero?

The links lie along the positive X axis in a straight line. The endpoint X coordinate equals the sum of the link lengths and Y is zero.

Why can an unequal two-link arm not reach the base?

Even when fully folded, unequal link lengths leave a gap equal to their absolute difference. This geometric minimum assumes the joints can rotate freely without collisions.

Does the drawing include gravity or motor torque?

No, the forward view calculates ideal geometry. Use the separate holding-torque tool to account for link masses and a payload.

Can I copy the calculated arm position?

Yes, the copy control includes both link lengths, the two joint angles and the endpoint coordinates. Coordinates are rounded to match the displayed result.

Can this control a real robot arm?

It is a geometry simulator rather than a hardware controller. Real motion also needs joint calibration, limits, collision checks and an appropriate motor control system.

Have a suggestion for Forward Kinematics 2R Arm Simulator?Share your feedback ↗