How it works
Provide any two sides of a right triangle to solve the third side, area, perimeter, and squared terms. Inputs are calculated locally in the browser, and valid values are retained in the page URL for bookmarking.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
3-
?mode=Known sidesChoice · Required · Default: hypotenuse · Accepted values: hypotenuse, leg, leg-a
-
?sideA=First known sideNumber · Required · Default: 3
-
?sideB=Second known sideNumber · Required · Default: 4
Outputs
9-
missingSideMissing sideNumber · Primary output
-
sideAResultSide aNumber
-
sideBResultSide bNumber
-
hypotenuseSide cNumber
-
aSquareda²Number
-
bSquaredb²Number
-
cSquaredc²Number
-
areaAreaNumber
-
perimeterPerimeterNumber
Formula notes
a²+b²=c²; c=√(a²+b²), a=√(c²−b²), or b=√(c²−a²).
Input guidance
Use consistent units for every length or measurement in the same calculation. Results are educational mathematical estimates and should be checked before high-stakes use.