Skip to main content
Skip to calculator
Advertisement

Last updated: July 31, 2026

ABC Triangle Calculator

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

a² + b² = c²; A = asin(a/c); B = 90° - A

Where:

  • a,b=Leg lengths
  • c=Hypotenuse

Worked Examples

Solve from two legs

Given a=3 and b=4.

  1. 1Use c = √(a²+b²)
  2. 2Compute c = 5
  3. 3Area = 6 and perimeter = 12
Final Answer: a=3, b=4, c=5 (triplet: Yes)

Solve from leg and hypotenuse

Given a=5 and c=13.

  1. 1Use b = √(c²-a²)
  2. 2Compute b = 12
  3. 3Then solve angles from asin(a/c)
Final Answer: a=5, b=12, c=13

Alternative leg-hypotenuse mode

Given b=8 and c=17.

  1. 1Use a = √(c²-b²)
  2. 2Compute a = 15
  3. 3Return full right-triangle measures
Final Answer: a=15, b=8, c=17

Introduction

This right-triangle calculator solves side lengths, acute angles, area, perimeter, and triplet status from common two-value input modes.

Formula and Method

The ABC Triangle Calculator uses the core relation a² + b² = c²; A = asin(a/c); B = 90° - A.

  • Apply the formula directly to user inputs

  • Compute intermediate terms when needed

  • Round numeric outputs for stable display

  • Return structured outputs for UI rendering

Input Fields

Provide values for: inputType, value1, value2.

  1. 1

    inputType: Known values

  2. 2

    value1: First known value

  3. 3

    value2: Second known value

Output Fields

The calculator returns: sideA, sideB, hypotenuse, angleA, angleB, area, perimeter, triangleType, pythagoreanTriplet.

  1. 1

    sideA: Leg a

  2. 2

    sideB: Leg b

  3. 3

    hypotenuse: Longest side

  4. 4

    angleA: Acute angle opposite side a

  5. 5

    angleB: Acute angle opposite side b

  6. 6

    area: 0.5 × a × b

  7. 7

    perimeter: a + b + c

  8. 8

    triangleType: Always right triangle for valid input

  9. 9

    pythagoreanTriplet: Whether integer sides form a triplet

Validation Rules

All values must be positive. In hypotenuse modes, the hypotenuse must be larger than the known leg.

  • Invalid or missing numeric values trigger safe fallback outputs

  • Error messaging is returned by the calculation function when constraints fail

  • Domain restrictions are enforced before formula evaluation

  • Rounding is applied to final numeric values

How to Use This Calculator

Enter valid inputs, run the calculation, and review both primary and supporting outputs.

  • Enter each required field

  • Click calculate

  • Check primary output first

  • Use examples to verify expected behavior

Practical Uses

This calculation is commonly used in math practice, engineering checks, and fast verification tasks.

  • Homework and exam preparation

  • Quick sanity checks while modeling

  • Teaching and tutoring demonstrations

  • Reusable reference for manual calculations

FAQs

What does the ABC Triangle Calculator compute?

It computes sideA, sideB, hypotenuse, angleA, angleB, area, perimeter, triangleType, pythagoreanTriplet from the provided inputs.

Which inputs are required?

Required fields are inputType, value1, value2.

How are results rounded?

Numeric outputs are rounded by the calculation function (generally to about 6 decimal places) for cleaner display.

What if I enter invalid values?

All values must be positive. In hypotenuse modes, the hypotenuse must be larger than the known leg.

Which output should I read first?

Start with sideA, then use the remaining outputs for context and interpretation.

Can I use decimal values?

Yes. Decimal inputs are supported unless the calculator specifically requires integer-style values.