Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Math > Trigonometry Calculators > Law of Cosines Calculator

Law of Cosines Calculator

Solve triangles using the Law of Cosines. Supports SAS (Side-Angle-Side) and SSS (Side-Side-Side) cases. Get step-by-step solutions, interactive triangle visualization, area, perimeter, and triangle classification!

Law of Cosines Calculator
b a ? C A B C
Enter values below to solve the triangle

Embed Law of Cosines Calculator Widget

About Law of Cosines Calculator

Welcome to our Law of Cosines Calculator, a powerful trigonometry tool for solving triangles. Whether you know two sides and the included angle (SAS) or all three sides (SSS), this calculator provides complete solutions with step-by-step explanations, interactive visualizations, and additional triangle properties like area and perimeter.

What is the Law of Cosines?

The Law of Cosines (also called the Cosine Rule) is a fundamental theorem in trigonometry that relates the lengths of the sides of any triangle to the cosine of one of its angles. It is a generalization of the Pythagorean theorem and works for all triangles, not just right triangles.

Law of Cosines Formula
$$c^2 = a^2 + b^2 - 2ab\cos(C)$$

Where $a$, $b$, and $c$ are the lengths of the sides, and $C$ is the angle opposite side $c$. The formula can be rearranged to find any side or angle:

Alternative Forms
$$a^2 = b^2 + c^2 - 2bc\cos(A)$$ $$b^2 = a^2 + c^2 - 2ac\cos(B)$$

To find an angle when all sides are known:

Solving for Angles
$$\cos(A) = \frac{b^2 + c^2 - a^2}{2bc}$$

Understanding Triangle Cases

SAS Side-Angle-Side

When you know two sides and the angle between them (the included angle).

  • Given: Sides $a$ and $b$, Angle $C$
  • Find: Side $c$, Angles $A$ and $B$
  • Method: Use $c^2 = a^2 + b^2 - 2ab\cos(C)$
SSS Side-Side-Side

When you know all three sides of the triangle.

  • Given: Sides $a$, $b$, and $c$
  • Find: Angles $A$, $B$, and $C$
  • Requirement: Triangle inequality must hold

How to Use This Calculator

  1. Select the case type: Choose SAS if you have two sides and the included angle, or SSS if you have all three sides.
  2. Choose angle unit: Select degrees or radians based on your input data.
  3. Enter your values:
    • SAS: Enter side a, side b, and angle C (the angle between them)
    • SSS: Enter all three sides a, b, and c
  4. Click Calculate: Get the complete triangle solution with all sides, angles, area, and perimeter.
  5. Review the solution: Examine the step-by-step calculation and interactive triangle visualization.

Applications of the Law of Cosines

🧭
Navigation Calculate distances and bearings in triangular paths
🌟
Astronomy Measure distances between celestial objects
šŸ“
Surveying Land measurement and boundary calculations
šŸ—ļø
Engineering Structural analysis and force calculations
⚔
Physics Vector analysis and resultant forces
šŸŽ®
Game Development Collision detection and 3D graphics

Law of Cosines vs Pythagorean Theorem

The Law of Cosines is a generalization of the Pythagorean theorem. When angle $C = 90°$, we have $\cos(90°) = 0$, so the formula simplifies to:

$$c^2 = a^2 + b^2 - 2ab \cdot 0 = a^2 + b^2$$

This is exactly the Pythagorean theorem! The Law of Cosines extends this relationship to work with any triangle, not just right triangles.

Triangle Inequality Theorem

For three lengths to form a valid triangle, they must satisfy the Triangle Inequality Theorem: the sum of any two sides must be greater than the third side.

Our calculator automatically validates SSS inputs against this theorem.

Classifying Triangles

The Law of Cosines can help determine the type of triangle:

Law of Cosines vs Law of Sines

Both laws are essential for solving triangles, but they apply to different situations:

Frequently Asked Questions

What is the Law of Cosines?

The Law of Cosines is a fundamental theorem in trigonometry that relates the lengths of the sides of a triangle to the cosine of one of its angles. The formula is $c^2 = a^2 + b^2 - 2ab\cos(C)$, where $a$, $b$, and $c$ are the sides of the triangle, and $C$ is the angle opposite side $c$. It generalizes the Pythagorean theorem to all triangles.

When should I use the Law of Cosines vs Law of Sines?

Use the Law of Cosines for SAS (Side-Angle-Side) and SSS (Side-Side-Side) cases. Use the Law of Sines for ASA (Angle-Side-Angle), AAS (Angle-Angle-Side), and SSA (Side-Side-Angle) cases. The Law of Cosines is more computationally stable for small angles.

What is the SAS case in triangle solving?

SAS (Side-Angle-Side) is when you know two sides of a triangle and the angle between them (the included angle). Using the Law of Cosines, you can find the third side, and then calculate the remaining angles.

What is the SSS case in triangle solving?

SSS (Side-Side-Side) is when you know all three sides of a triangle. Using the Law of Cosines rearranged to solve for angles, you can find all three angles. The triangle must satisfy the triangle inequality theorem.

How do I know if three sides can form a valid triangle?

Three sides form a valid triangle if they satisfy the Triangle Inequality Theorem: the sum of any two sides must be greater than the third side. This means $a + b > c$, $a + c > b$, and $b + c > a$ must all be true.

How is the Law of Cosines related to the Pythagorean theorem?

The Law of Cosines is a generalization of the Pythagorean theorem. When angle $C$ is 90°, $\cos(90°) = 0$, so the formula $c^2 = a^2 + b^2 - 2ab\cos(C)$ reduces to $c^2 = a^2 + b^2$, which is the Pythagorean theorem.

Additional Resources

Reference this content, page, or tool as:

"Law of Cosines Calculator" at https://MiniWebtool.com/law-of-cosines-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Jan 19, 2026

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Related MiniWebtools:

Trigonometry Calculators:

Top & Updated:

Random Name PickerRandom PickerRelative Standard Deviation CalculatorLine CounterSort NumbersMAC Address GeneratorFPS ConverterBatting Average CalculatorMAC Address LookupFeet and Inches to Cm ConverterERA CalculatorWord to Phone Number ConverterRemove SpacesFacebook User ID LookupPercent Off CalculatorBitwise CalculatorSum CalculatorRandom Quote GeneratorLog Base 10 CalculatorInstagram User ID LookupNumber of Digits CalculatorRandom Truth or Dare GeneratorRoman Numerals ConverterCm to Feet and Inches ConverterSaturn Return CalculatorSHA256 Hash GeneratorText FormatterBinary to Gray Code ConverterOn Base Percentage CalculatorPhone Number ExtractorAI ParaphraserStandard Error CalculatorSlugging Percentage CalculatorOutlier CalculatorSalary Conversion CalculatorVideo to Image ExtractorDecimal to BCD ConverterSquare Root (√) CalculatorSun, Moon & Rising Sign Calculator šŸŒžšŸŒ™āœØCompound Growth CalculatorMP3 LooperBCD to Decimal ConverterRandom Birthday GeneratorFirst n Digits of PiQuotient and Remainder CalculatorNumber to Word ConverterDay of Year CalendarAI Punctuation AdderAudio SplitterGray Code to Binary ConverterOPS CalculatorLeap Years ListAntilog CalculatorRemove AccentCompare Two StringsTime Duration CalculatorMedian CalculatorMerge VideosPercent Growth Rate CalculatorRemove Lines Containing...Random Movie PickerDay of the Year Calculator - What Day of the Year Is It Today?Octal CalculatorRandom Group GeneratorBinary to BCD ConverterExponential Decay CalculatorIP Address to Hex ConverterFirst n Digits of eScientific Notation to Decimal ConverterBonus CalculatorCM to Inches ConverterRandom IMEI GeneratorLog Base 2 CalculatorPER CalculatorRemove Audio from VideoSHA512 Hash GeneratorLove Compatibility CalculatorArgon2 Hash GeneratorNext Leap Year CalculatorAverage Deviation CalculatorRandom Credit Card GeneratorRandom Poker Hand GeneratorRandom Superpower GeneratorRandom Object GeneratorNumber ExtractorModulo CalculatorGini Coefficient CalculatorHypotenuse CalculatorVideo CompressorRatio to Percentage CalculatorWhat is my Lucky Number?Name Number CalculatorVideo CropperConvolution CalculatorList of Prime NumbersRandom Date GeneratoršŸ“… Date CalculatorHex to BCD ConverterMultiplication CalculatorRandom Time GeneratorEmail ExtractorURL ExtractorAdd Prefix and Suffix to TextWHIP CalculatorSort Lines AlphabeticallyBCD to Binary ConverterLottery Number GeneratorBCD to Hex ConverterList RandomizerBreak Line by CharactersAverage CalculatorPVIFA CalculatorReverse VideoWAR CalculatorActual Cash Value CalculatorAngel Number CalculatorRoot Mean Square CalculatorSum of Positive Integers CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterMAC Address AnalyzerRandom String GeneratorRemove Leading Trailing SpacesAmortization CalculatorMarkup CalculatorPVIF CalculatorDecimal to Hex ConverterDaily Time Savings CalculatorLorem Ipsum GeneratorReadability Score CalculatorKeyword Density CheckerBionic Reading ConverterText to Speech ReaderFancy Text GeneratorZalgo Text GeneratorUpside Down Text GeneratorInvisible Text GeneratorASCII Art GeneratorList Difference CalculatorText Column ExtractorText to SQL List ConverterInvisible Character RemoverStock Average CalculatorPosition Size CalculatorMargin Call CalculatorShort Selling Profit CalculatorRisk of Ruin CalculatorBlack-Scholes Option Pricing CalculatorOption Greeks CalculatorImplied Volatility CalculatorOptions Profit CalculatorImpermanent Loss CalculatorCrypto Arbitrage CalculatorSatoshi to USD ConverterCrypto Leverage CalculatorPivot Point CalculatorFibonacci Extension CalculatorStop Loss & Take Profit CalculatorKelly Criterion CalculatorMartingale Strategy CalculatorCompound Daily Interest CalculatorPip Value CalculatorGaussian Distribution GeneratorRandom Tournament Bracket GeneratorRandom Meal GeneratorRandom Emoji GeneratorRandom Color Palette GeneratorRandom Country GeneratorRandom JSON GeneratorRandom User-Agent GeneratorRandom Coordinate GeneratorRandom IP Address GeneratorRandom Playing Card GeneratorMagic 8-BallRock Paper Scissors GeneratorCoin FlipperDice RollerSpin the WheelAquarium Volume & Stocking CalculatorAquarium Substrate CalculatorScale Model Conversion CalculatorPlant Spacing CalculatorDice Roll Probability CalculatorDepth of Field (DoF) CalculatorGolden Hour / Blue Hour CalculatorPrint Size & Resolution Calculator (DPI/PPI)Soap Making Lye Calculator (SAP)Candle Wax & Fragrance Oil CalculatorHomebrew ABV Calculator (Alcohol by Volume)Coffee Brew Ratio CalculatorBrine and Salinity CalculatorYarn CalculatorFabric CalculatorCross-Stitch Size CalculatorBaker's Percentage CalculatorDough Hydration CalculatorBaking Pan Size ConverterYeast Conversion CalculatorJSON to YAML ConverterJWT DecodercURL to JSON ConverterSQL FormatterCrontab Expression GeneratorFavicon GeneratorSVG OptimizerHtaccess Redirect GeneratorResistor Color Code CalculatorOhm's Law CalculatorVoltage Drop CalculatorPCB Trace Width CalculatorBattery Life CalculatorRandom PIN GeneratorRandom NanoID GeneratorRandom Port Number GeneratorRandom Fake Address GeneratorRandom User Persona GeneratorRandom Writing Prompt GeneratorRandom Haiku GeneratorRandom Domain Name GeneratorRandom Cocktail Recipe GeneratorRandom Activity GeneratorRandom Excuse GeneratorRandom US State GeneratorLemonade Stand CalculatorPizza Value CalculatorVampire Apocalypse CalculatorChristmas Tree CalculatorParking Ratio CalculatorGooglebot Crawl Size CheckerZombie Survival Time CalculatorHelium Balloon Lift CalculatorKinetic Energy Chicken CookerTeleportation Error Rate CalculatorHamster Power CalculatorBanana Radiation CalculatorFalling Through Earth CalculatorPenny Drop Impact CalculatorPopcorn Fill Room CalculatorLego Brick House CalculatorWedding Alcohol CalculatorPizza Party PlannerCaffeine Overdose CalculatorBBQ CalculatorTaco Bar CalculatorBeer Chill Time CalculatorSpaghetti Portion CalculatorCocktail ABV CalculatorChocolate Fountain CalculatorCheese Board CalculatorSudoku Generator & Solver24 Game Solver & TrainerNonogram Generator (Picross)KenKen Generator (Calcudoku)Kakuro GeneratorPoop Salary CalculatorMeeting Cost TickerCommute Life Wasted CalculatorFIRE CalculatorEmail Reply Time CalculatorCoffee vs. Sleep CalculatorReal Hourly Wage CalculatorSick Day Probability CalculatorBuzzword Bingo GeneratorKeyboard Mileage CalculatorToilet Paper Value CalculatorElectricity Cost of Bitcoin Mining CalculatorShower Cost CalculatorLight Bulb Savings CalculatorCat Calorie CalculatorHuman to Ant Weight ConverterTruth Table GeneratorSet Theory CalculatorVenn Diagram Generator (3 Sets)Chinese Remainder Theorem CalculatorEuler's Totient Function CalculatorExtended Euclidean Algorithm CalculatorModular Multiplicative Inverse CalculatorContinued Fraction CalculatorShoelace Formula CalculatorTriangle Centroid CalculatorTriangle Orthocenter CalculatorPoint to Plane Distance CalculatorSphere Equation CalculatorGram-Schmidt CalculatorVector Projection CalculatorMatrix LU Decomposition CalculatorRadius of Convergence CalculatorCurvature CalculatorCollatz Conjecture CalculatorHappy Number CalculatorMagic Square GeneratorDijkstra's Shortest Path CalculatorMinimum Spanning Tree CalculatorGraph Degree Sequence ValidatorCatalan Number GeneratorDerangement (Subfactorial) CalculatorStirling Numbers CalculatorPigeonhole Principle CalculatorMarkov Chain Steady State CalculatorSingular Value Decomposition (SVD) CalculatorRandom RPG Character GeneratorRandom Chess Opening GeneratorRandom Loadout GeneratorRandom Chord GeneratorRandom Sound Frequency GeneratorMatrix Rank CalculatorMatrix Trace CalculatorWronskian CalculatorRunge-Kutta (RK4) Method CalculatorFourier Series Coefficients CalculatorFunction Odd Even Neither CheckerCone Flat Pattern (Template) GeneratorPolygon Diagonals CalculatorEuler Characteristic CalculatorRSA Encryption Step-by-Step SimulatorPrimitive Root CalculatorKiller Sudoku GeneratorFutoshiki GeneratorHashi (Bridges) Puzzle GeneratorSlitherlink Puzzle GeneratorWord Search Puzzle GeneratorCrossword Puzzle MakerCryptogram GeneratorWord Scramble GeneratorWord Ladder GeneratorBingo Card GeneratorConnect the Dots GeneratorTip CalculatorCurrency Converter401(k) CalculatorRoth IRA CalculatorRetirement CalculatorSocial Security Benefits CalculatorPension CalculatorRMD CalculatorSIP CalculatorMutual Fund CalculatorStock Profit Loss CalculatorDividend Reinvestment CalculatorDollar Cost Averaging CalculatorBusiness Loan CalculatorPersonal Loan CalculatorDebt Payoff CalculatorDebt Consolidation CalculatorNet Worth CalculatorBudget CalculatorSavings Goal Calculator