Enter two known angles of a triangle (in degrees). The calculator will determine the third angle.
Calculated Angle C:
—
Understanding the Angles of a Triangle
In Euclidean geometry, a triangle is a fundamental polygon with three edges and three vertices. One of the most important properties of any triangle is that the sum of its internal angles always equals 180 degrees. This principle holds true for all types of triangles, whether they are acute, obtuse, right-angled, equilateral, isosceles, or scalene.
This calculator is based on the simple yet powerful geometric theorem:
Angle A + Angle B + Angle C = 180°
Given any two angles of a triangle, we can easily solve for the third angle using basic algebraic manipulation. If you know Angle A and Angle B, the formula to find Angle C is:
Angle C = 180° – Angle A – Angle B
How to Use This Calculator:
Enter the values for any two known angles of the triangle in the "Angle A (degrees)" and "Angle B (degrees)" fields.
Ensure the values are positive and represent degrees.
Click the "Calculate Third Angle" button.
The calculator will compute and display the value of the third angle in degrees. The result field for "Angle C" will be populated.
If the input values are invalid (e.g., negative, sum of two angles >= 180), an error message will appear.
Click "Reset" to clear all fields and start over.
Use Cases:
Geometry Problems: Quickly solve for missing angles in homework or exam problems.
Trigonometry: Essential for setting up trigonometric calculations where angle information is key.
Navigation and Surveying: Triangulation is a common technique, and understanding triangle angles is fundamental.
Design and Engineering: Used in various applications requiring precise geometric calculations.
Educational Tool: Helps students visualize and understand the angle sum property of triangles.
Important Considerations:
The sum of the two provided angles must be less than 180 degrees for a valid triangle to exist.
All angles must be positive.
This calculator assumes a triangle in Euclidean (flat) space.
function calculateThirdAngle() {
var angleAInput = document.getElementById("angleA");
var angleBInput = document.getElementById("angleB");
var angleCInput = document.getElementById("angleC");
var resultContainer = document.getElementById("resultContainer");
var calculatedAngleCDisplay = document.getElementById("calculatedAngleC");
var errorMessageDiv = document.getElementById("errorMessage");
// Clear previous error messages and results
errorMessageDiv.textContent = "";
resultContainer.style.display = 'none';
angleCInput.value = ""; // Clear the readonly input field
var angleA = parseFloat(angleAInput.value);
var angleB = parseFloat(angleBInput.value);
// Input validation
if (isNaN(angleA) || isNaN(angleB)) {
errorMessageDiv.textContent = "Please enter valid numbers for both angles.";
return;
}
if (angleA <= 0 || angleB = 180 || angleB >= 180) {
errorMessageDiv.textContent = "Angles cannot be 180 degrees or more.";
return;
}
var sumOfTwoAngles = angleA + angleB;
if (sumOfTwoAngles >= 180) {
errorMessageDiv.textContent = "The sum of the two given angles must be less than 180 degrees for a valid triangle.";
return;
}
// Calculate the third angle
var angleC = 180 – sumOfTwoAngles;
// Display the result
angleCInput.value = angleC.toFixed(2); // Display in the readonly input field
calculatedAngleCDisplay.textContent = angleC.toFixed(2) + "°";
resultContainer.style.display = 'block';
}
function resetForm() {
document.getElementById("angleA").value = "";
document.getElementById("angleB").value = "";
document.getElementById("angleC").value = "";
document.getElementById("resultContainer").style.display = 'none';
document.getElementById("errorMessage").textContent = "";
}