Relative Velocity Calculator
A relative velocity calculator answers a frame-of-reference question: how fast does one moving object appear to approach, recede, or pass another moving object? Instead of treating speed as a plain number, this calculator uses two speed magnitudes and the angle between their directions, so it can model same-lane traffic, head-on motion, crossing paths, and diagonal motion in one consistent way.
What the result represents
Relative velocity is the velocity of object 1 as seen from object 2, or equivalently the magnitude of the vector difference between their velocity vectors. The calculator shows a speed magnitude, not a compass bearing or signed component. That distinction matters. If two runners travel east at 6 m/s and 4 m/s, the faster runner gains at 2 m/s. If the same runners move directly toward each other, the gap closes at 10 m/s. The speeds did not change, but the geometry did.
The input unit can be meters per second, kilometers per hour, or miles per hour. Meters per second is the SI-derived velocity unit used in physics, while kilometers per hour and miles per hour are common in transportation. If your values are in different units, convert them first with the speed calculator or the feet per second to meters per second calculator. If you later need a change in velocity over time, the acceleration calculator handles that separate question.
Formula and derivation
The calculator applies the law of cosines to the vector triangle formed by the two velocity vectors and their difference:
where:
- is the first object’s speed in the selected unit.
- is the second object’s speed in the same unit.
- is the angle between the velocity directions, in degrees.
- is the magnitude of the velocity difference, reported in the same speed unit.
The formula comes from subtracting vectors. The squared length of the difference vector depends on both magnitudes and the cosine of the included angle. At , the cosine is 1, so the expression reduces to the absolute speed difference. At , the cosine is -1, so the speeds add. At , the cosine is 0, leaving a right-triangle calculation.
Example
Use the default-style example: the first object moves at 10 m/s, the second at 5 m/s, and the angle between their velocity directions is 60 degrees.
Because , the expression becomes:
Rounded the same way as the calculator, the relative velocity is 8.66 m/s. The result is less than the head-on sum of 15 m/s and greater than the same-direction difference of 5 m/s, which is exactly what the 60-degree geometry suggests.
Interpreting common angles
For same-direction motion, enter 0 degrees. This is the car-following case: a vehicle at 65 mph and another at 60 mph separate at 5 mph if they are in the same lane and direction. For opposite-direction motion, enter 180 degrees. Two trains at 70 km/h and 50 km/h close at 120 km/h before they pass. For perpendicular motion, enter 90 degrees. A drone flying north while wind carries air east can be analyzed as a right triangle if the two velocity components are perpendicular.
Angles between 180 and 360 degrees are accepted because the cosine function repeats symmetrically. For example, 300 degrees gives the same magnitude as 60 degrees. The magnitude alone cannot tell clockwise from counterclockwise; direction would require component calculations.
Applications and limits
Relative velocity appears in collision avoidance, navigation, sports tracking, robotics, and introductory mechanics. A pilot cares about airspeed relative to the air mass and ground speed relative to Earth. A boat crossing a river has motion relative to water and motion relative to the shore. A camera-tracking system may measure one athlete’s motion relative to another, not merely their independent speeds.
The calculator assumes constant velocities during the interval being considered. If either object accelerates, the relative velocity changes over time; use an instant-by-instant value or analyze the acceleration separately. Speeds must be nonnegative, and both speeds must use the same unit. The angle describes direction only; do not enter a bearing unless you have first converted two bearings into the smaller included angle between velocity vectors.
Edge cases and common mistakes
A speed of zero is allowed. Then the relative velocity is simply the other object’s speed, because a stationary observer sees the moving object at its ordinary speed. If both speeds are zero, the result is zero. The calculator accepts angles from 0 to 360 degrees; values outside that range are invalid. It does not perform relativistic velocity addition, so it is not a particle-physics tool.
Common mistakes include subtracting speeds even when objects are not parallel, using degrees in a formula that expects radians, mixing mph and m/s, and assuming the result includes direction. The calculation converts the entered angle to radians before applying the cosine, so the displayed degree input is the correct one to use.
Sources
- OpenStax, University Physics Volume 1: Relative Motion in One and Two Dimensions — reference-frame treatment of relative motion.
- NIST, SI Units — official context for SI units such as the meter and second.
- Wolfram MathWorld, Pythagorean Theorem — geometric basis for the perpendicular special case.