Simplify Your Workflow: Search MiniWebtool.
Add Extension
See also
Law of Sines CalculatorIdeal Gas Law CalculatorRight Triangle CalculatorGeneral Triangle SolverPythagorean Theorem CalculatorElectricity Calculator
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.

Trigonometry Calculators:

Top & Updated:

Instagram User ID LookupRandom PickerRandom Name Picker WheelImage ResizerFacebook User ID LookupLine CounterSort NumbersRSD Calculator - Relative Standard DeviationSun, Moon & Rising Sign Calculator 🌞🌙✨Remove SpacesFPS ConverterRandom Quote GeneratorWord to Phone Number Converter⬛ Aspect Ratio CalculatorMAC Address Generator📷 OCR / Image to Text🖱️ Click CounterMAC Address LookupERA CalculatorSquare Root (√) CalculatorRandom Credit Card GeneratorMerge VideosPercent Off CalculatorJulian Date ConverterSHA256 Hash GeneratorSlope and Grade CalculatorCm to Feet and Inches ConverterWeight Loss CalculatorJob FinderBatting Average CalculatorRandom Fake Address GeneratorSum CalculatorRoman Numerals ConverterNumber of Digits CalculatorBCD ConverterMP3 LooperIP Subnet CalculatorAdd Text to ImageLog Base 10 CalculatorPhone Number ExtractorRandom Superpower GeneratorInvisible Text GeneratorRandom IMEI GeneratorAudio SplitterVertical Jump CalculatorName RandomizerMaster Number CalculatorRandom Truth or Dare GeneratorSalary Conversion CalculatorImage SplitterBitwise CalculatorFeet and Inches to Cm ConverterText FormatterRandom Activity GeneratorNumber to Word ConverterHalfway Date CalculatorLunar Calendar ConverterVideo CompressorCaffeine Overdose CalculatorRandom Birthday GeneratorYouTube Channel StatisticsWord Ladder GeneratorOctal CalculatorSun Position CalculatorRandom Writing Prompt GeneratorLong Division CalculatorRandom Poker Hand GeneratorCompound Growth CalculatorSHA512 Hash GeneratorLeap Years ListOPS CalculatorMultiplication CalculatorBinary to Gray Code ConverterHebrew Calendar ConverterOutlier Calculator🔍 Plagiarism CheckerImage CompressorStair CalculatorBolt Torque CalculatorQuotient and Remainder CalculatorRandom Meal GeneratorRandom Movie PickerEstimation CalculatorMD5 Hash GeneratorBreak Line by CharactersFirst n Digits of PiList RandomizerFile Size ConverterStandard Error CalculatorEmail ExtractorCompare Two StringsModulo CalculatorRandom Emoji GeneratorList of Prime NumbersBroken Link CheckerArc Length CalculatorFlip VideoRandom Video Thumbnail GeneratorRandom Loadout GeneratorAPI TesterBingo Card GeneratorVideo to Image ExtractorPercent Growth Rate CalculatorMultiple Fraction CalculatorAI Language DetectoreBay Fee CalculatorPercent to PPM Converter🎰 Gacha Pity CalculatorEquation of a Line CalculatorAstrological Element Balance CalculatorOrder of Operations Calculator (PEMDAS)Chinese Gender PredictorBcrypt Hash Generator / CheckerRandom User-Agent Generator📅 Date CalculatorURL ExtractorDay of Year CalendarRandomize NumbersDay of the Year Calculator - What Day of the Year Is It Today?🔊 Tone GeneratorSlugging Percentage CalculatorFraction CalculatorNumber ExtractorLove Compatibility CalculatorRandom Tournament Bracket GeneratorRandom Chord GeneratorAdd Prefix and Suffix to TextIP Address to Hex ConverterRemove AccentInequality SolverPaycheck Calculator (Take-Home Pay)Cone Flat Pattern (Template) GeneratorName Number CalculatorWHIP CalculatorDMS to Decimal Degrees ConverterWAR CalculatorRandom Group GeneratorRandom Math Problem GeneratorScientific Notation to Decimal ConverterWhat is my Zodiac Sign?Social Media Username CheckerLottery Number GeneratorImage CropperAcreage CalculatorBattery Life CalculatorLED Resistor CalculatorMagic 8-BallWhat is my Lucky Number?Trigonometric Equation SolverAI Text HumanizerSocial Media Post Time Optimizer📊 Bar Graph MakerLimit CalculatorSigma Notation Calculator (Summation)Word Scramble GeneratorColor InverterRandom Number PickerMercury Retrograde CalendarRemove Lines Containing...Whitespace VisualizerYouTube Tag ExtractorDecibel (dB) CalculatorSaturn Return CalculatorAdjust Video SpeedConnect the Dots GeneratorRandom Line PickerRatio to Percentage CalculatorIP Address to Binary ConverterSquare Numbers ListRandom Object GeneratorRandom PIN GeneratorDomain and Range CalculatorOn Base Percentage CalculatorRatio CalculatorLogarithmic Equation SolverFirst n Digits of eSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾Algebraic Expression SimplifierImage EnhancerRadical SimplifierAm I Overweight?Reverse TextVideo SplitterLbs to Kg ConverterLong Multiplication CalculatorParabola CalculatorSum of Positive Integers CalculatorIs it a Prime Number?Pregnancy CalendarRandom Excuse GeneratorHousing Appreciation CalculatorHypotenuse CalculatorScientific Notation CalculatorText Case ConverterWater Usage CalculatorPER CalculatorPipe Flow CalculatorBCD to Decimal ConverterGray Code to Binary ConverterAI ParaphraserAI Punctuation AdderBinary to BCD ConverterSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorAverage CalculatorPVIFA CalculatorReverse VideoRemove Audio from VideoActual Cash Value CalculatorAngel Number CalculatorLog Base 2 CalculatorRoot Mean Square CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderTime Duration CalculatorHex to Decimal ConverterConvolution CalculatorMAC Address AnalyzerRandom String GeneratorRemove Leading Trailing SpacesMarkup CalculatorPVIF CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorBoiling Point CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorBernoulli Equation CalculatorSurfboard Volume CalculatorTennis Grip Size CalculatorBackpack Size CalculatorCelsius to Fahrenheit ConverterFahrenheit to Celsius ConverterKm to Miles ConverterMiles to Km ConverterMM to Inches ConverterInches to MM ConverterStone to Kg ConverterKg to Stone ConverterLiters to Gallons ConverterGallons to Liters ConverterML to Oz ConverterOz to ML ConverterSquare Meters to Square Feet ConverterSquare Feet to Square Meters ConverterCubic Feet to Cubic Yards ConverterCubic Meters to Cubic FeetKnots to MPH ConverterMPH to KMH / KMH to MPHMg to Ml ConverterAI Text SummarizerAI TranslatorAI Story GeneratorAI Poem GeneratorAI Song Lyrics GeneratorMcg to Mg ConverterIndian Land Unit ConverterTola to Gram ConverterPX to REM ConverterPT to PX ConverterMerge PDFSplit PDFCompress PDFPDF to JPGJPG to PDFRotate PDFDelete PDF PagesAdd Page Numbers to PDFProtect PDFReorder PDF PagesPDF Word CounterPDF Page ExtractorPDF to Text ExtractorUnlock PDF (Owner-Password Removal)PDF Flatten ToolAI Rap Lyrics GeneratorAI Cover Letter GeneratorAI Resume Bullet GeneratorAI LinkedIn Headline & Bio GeneratorAI Instagram Caption GeneratorAI YouTube Title & Description GeneratorAI Video Script GeneratorAI Product Description GeneratorAI Press Release GeneratorAI Wedding Speech GeneratorAI Thank-You Note GeneratorAI Dream InterpreterRandom Question GeneratorWould You Rather GeneratorNever Have I Ever GeneratorIcebreaker Question GeneratorCharades GeneratorPictionary Word GeneratorHangman Word GeneratorTrivia Question GeneratorRandom Fact GeneratorRandom Joke GeneratorDad Joke GeneratorPickup Line GeneratorCompliment GeneratorDaily Affirmation GeneratorJournal Prompt GeneratorDrawing Idea GeneratorFortune Cookie GeneratorFantasy Name GeneratorCapacitor Bank Sizing CalculatorSolar Charge Controller Sizing CalculatorBattery C-Rate CalculatorBattery Internal Resistance CalculatorPeukert Battery Runtime CalculatorWire Resistance CalculatorPCB Via Current CalculatorBand Name GeneratorRap Name GeneratorNickname GeneratorTeam Name GeneratorGamertag GeneratorConvert Video for Twitter (X)