ToolPony.comDocumentation

Right triangle calculator

Find the legs, hypotenuse and angles from two known measurements, including altitude, area or perimeter.

Get started

  1. Enter two measurements, including at least one length, area or perimeter.
  2. The two solutions swap the labels of the legs and acute angles.

Example

Input

c = 5, h = 2.4

Expected result

Legs 3 and 4, area 6, perimeter 12. Either leg can be a.

Try it

Good to know

The calculation runs in your browser. Use consistent units in fields with no explicit unit.

Calculation method

c is the hypotenuse. h is its perpendicular altitude. Use consistent length units and the corresponding square unit for area.

c2=a2+b2,h=ab/c,S=ab/2,P=a+b+cc^2=a^2+b^2,\quad h=ab/c,\quad S=ab/2,\quad P=a+b+c
a,b=c2+2ch  ±  c2−2ch2a,b=\frac{\sqrt{c^2+2ch}\;\pm\;\sqrt{c^2-2ch}}{2}