ForHosting KIT · Math

Right triangle trigonometry

With legs of 3 and 4 the hypotenuse is 5 and the acute angles are about 36.87° and 53.13°. Give any two sides, or one side and one acute angle, and get the missing sides, both angles, sine, cosine, tangent and the area. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
3
B
4
You get
C
5
Angle a
36.8698976458
Angle b
53.1301023542
Angle c
90

Right triangle trigonometry is the set of sine, cosine, and tangent ratios that relate each acute angle of a right triangle to the three sides. Given any two sides, or one side together with one acute angle, those ratios plus the Pythagorean theorem determine every remaining length and every remaining angle. This solver accepts the standard classroom labeling: side a opposite angle A, side b opposite angle B, and hypotenuse c opposite the right angle. It returns the completed triple, both acute angles in degrees, the six SOHCAHTOA ratios, and the area.

What right triangle trigonometry actually computes

A right triangle has one interior angle of exactly ninety degrees. The two remaining angles are acute, they sum to ninety degrees, and each is paired with an opposite leg and an adjacent leg. Sine of an acute angle is opposite over hypotenuse, cosine is adjacent over hypotenuse, and tangent is opposite over adjacent — the SOHCAHTOA identities every trigonometry course starts from.

Once any two sides are known, the third side follows from the Pythagorean theorem and the acute angles follow from inverse tangent of the two legs. Once one side and one acute angle are known, the complementary acute angle is ninety minus the given angle, and the missing sides follow by rearranging sine, cosine, or tangent according to which side arrived. This capability encodes both modes end to end: two sides, or one side and one acute angle.

Classic checks appear immediately. Legs three and four recover hypotenuse five, angle A about 36.87 degrees, and angle B about 53.13 degrees. A hypotenuse of ten with angle A of thirty degrees recovers the 30-60-90 proportions.

Because an angle of zero or ninety degrees would collapse a leg or turn the figure into a line, the solver refuses any angle that is not strictly between zero and ninety degrees instead of returning a zero side or a silently swapped assignment. It also refuses a hypotenuse that is not strictly longer than each known leg, so a pair that cannot sit opposite a right angle never looks like a successful trigonometric solve.

Where solving right triangles comes in handy

Classrooms and tutoring platforms use a right triangle trigonometry solver so learners can check both remaining sides and both acute angles without mixing up which SOHCAHTOA ratio applies to which given pair. Construction and layout tools convert a measured run plus a known roof pitch, or two measured members, into the complementary cut and the complementary angle before ordering stock. Survey and navigation notebooks recover height or ground distance from one measured length and one elevation or depression angle without pulling a full computer-algebra system.

Game engines and physics sandboxes spawn right triangles from whichever pair the designer already stored — two extents, or one extent and a heading — and need the complementary values without a geometry library. Exam generators and LMS plugins need a deterministic oracle that rejects a non-acute angle and a hypotenuse that is not the longest side instead of taking absolute values and marking swapped homework as correct.

Keep requests small, pin the rounded sides and angles in tests, and you get reproducible trigonometry for homework, edge workers, and design scripts without standing up symbolic math infrastructure of your own.

Classroom SOHCAHTOA checks

Students enter any two sides, or one side and one acute angle, and verify every remaining length and both acute angles against textbook 3-4-5 and 30-60-90 exercises.

Roof pitch and cut lengths

Convert a measured run plus a known pitch angle, or two measured members, into the complementary cut, the complementary acute angle, and the area of the triangular face.

Survey height from one length and one angle

Recover the opposite height or the adjacent ground distance from a single tape measurement and an elevation or depression angle without a computer-algebra library.

How do I solve a right triangle with trigonometry?

The solver returns every remaining side, both acute angles, the six SOHCAHTOA ratios, and the area.

What happens if the angle is not between 0 and 90 degrees?

An angle of 0 or 90 degrees, a negative angle, or an obtuse angle is not an acute angle of a right triangle.

Which labeling do a, b, c and the angles use?

The two acute angles always sum to 90 degrees.

Can I send two sides and also an angle?

No. Send either any two sides with both angles omitted, or exactly one side and exactly one acute angle. Extra knowns are rejected so the contract stays unambiguous.

What if the hypotenuse I enter is shorter than a leg?

The calculator rejects it. The hypotenuse sits opposite the right angle and must be strictly longer than each leg, so a pair like that cannot form a right triangle and is flagged rather than solved.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/right-triangle-trigonometry

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/right-triangle-trigonometry \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":3,"leg_a":1}'
{
  "a": 3,
  "leg_a": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.right_triangle_trigonometry",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

An angle that is not strictly between zero and ninety degrees is rejected as invalid_input, because it is not an acute angle of a right triangle.

Input contract, response shape, and error behaviour

For two known sides send exactly two of a, b, and c and omit both angles: a and b are the legs that meet the right angle, and c is the hypotenuse. A given side that is zero, negative, infinite, NaN, or not a decimal number fails naming the field. POST a JSON body in one of two shapes. For a side-and-angle solve send exactly one of those sides together with exactly one acute angle, angle_a or angle_b, measured in degrees. Each field may arrive as a JSON number or as a numeric string. Side a also accepts the aliases leg_a, side_a, and opp_a; b accepts leg_b, side_b, and opp_b; c accepts hypotenuse, hyp, and side_c; angle_a accepts alpha and angleA; angle_b accepts beta and angleB. Sending only one side, only an angle, three sides, two sides plus an angle, or both angles at once fails with invalid_input asking for any two sides or one side and one acute angle. An angle that is not between 0 and 90 degrees — including the endpoints — fails with invalid_input and is not billed. On success the body returns sides a, b, and c, angles angle_a, angle_b, and angle_c (always 90), the six ratios sin_a through tan_b, the area as half of a times b, angle_unit set to deg, given naming the fields you sent, and method set to two_sides or side_and_angle. Pair the structured JSON with your own drawing code if you need a sketch; this endpoint returns numbers only and does not emit SVG, unit conversion, or a step-by-step prose walkthrough.

What does the right triangle trigonometry solver cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →