Angle Between Two Lines Calculator
Enter the slope of each line to find the angle between them.
Result
How it is calculated
Each slope is the rise over run of a line, m = Δy / Δx, a plain number with no unit. The tool computes tan θ = |(m1 − m2) / (1 + m1·m2)| and then θ = arctan(tan θ), shown in degrees to three decimals. If 1 + m1·m2 is zero the lines are perpendicular and the angle is reported as 90°. Equal slopes give 0° and are labelled parallel. A second figure, the acute angle, is the smaller of θ and 180° − θ. Both slopes must be filled in, otherwise no result appears. A vertical line has no finite slope, so it cannot be entered.
Worked example
Take two lines with slopes m1 = 3 and m2 = 1. The numerator is 3 − 1 = 2 and the denominator is 1 + 3·1 = 4, so tan θ = |2 / 4| = 0.5. Then θ = arctan(0.5), which gives an angle of 26.565°. Because that is already below 90°, the acute angle is the same 26.565°. Since the denominator is not zero and the slopes differ, the note says the lines are intersecting.
Common mistakes
- Typing the angle of inclination in degrees (for example 45) instead of the slope. A 45° line has slope 1, so enter 1.
- Forgetting the absolute value and expecting a negative angle: the result is always between 0° and 90°, whichever line you call m1.
- Entering a vertical line as a very large number. It works approximately, but a vertical line has no slope, so use a different method for it.
- Mixing up the slope with the y-intercept in
y = mx + b. Only the coefficient m of x goes in. - Rearranging an equation like
2y = 6x + 1without dividing by 2 first. The slope there is 3, not 6.
About this calculator
When two straight lines are described by their slopes m1 and m2, the angle between them can be found without ever drawing a diagram, using tan θ = the absolute value of (m1 − m2) divided by (1 + m1·m2). The formula falls directly out of the tangent subtraction identity applied to each line's angle of inclination, and it correctly returns zero for parallel lines (equal slopes). For perpendicular lines 1 + m1·m2 equals zero, so the tangent formula itself is undefined, but the angle is simply 90°, which is what this calculator reports.
This calculator takes the two slopes and returns the angle between the lines they represent, along with the acute angle and a note saying whether the lines are parallel, perpendicular, or intersecting. It's a standard tool in coordinate geometry and trigonometry courses, and the same relationship is used in fields like surveying, CAD drafting, and engineering drawing whenever the angle between two linear features needs to be derived from their gradients rather than measured directly.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool cannot take a vertical line, but you can still handle one by hand: the angle between a vertical line and a line with slope m is 90 degrees minus arctan of the absolute value of m. For slope 1 that gives 45 degrees. The result is always between 0 and 90 degrees, so it is the smaller of the two angles the lines make. Do you usually start from slopes, equations or two points on each line?