Gradient Calculator

calculatorsonline.co.uk

Gradient Calculator

Find the gradient (slope) of a line instantly from two points or a linear equation. Calculate the angle, y-intercept, and full equation of the line with step-by-step breakdowns.

📐 Slope Finder
📈 Line Equation
📏 Angle Calculator
🧮 Two Points

Gradient & Slope Calculator

Calculate the gradient from points or an equation

Input Method

Enter the coordinates of two distinct points on the line.

Quick examples:

Your Gradient Results

Slope, angle, and line equation

📐

Enter two points or a linear equation, then click Calculate to find the gradient, angle, and equation of the line.

Gradient & Angle Reference

Common gradient values and their corresponding angles with the positive x-axis.

Gradient (m) Angle (θ) Line Type
00°Horizontal
145°Diagonal (Up)
√3 ≈ 1.73260°Steep (Up)
Undefined90°Vertical
-1135° (or -45°)Diagonal (Down)
-√3 ≈ -1.732120° (or -60°)Steep (Down)

Gradient Calculator FAQ

Everything you need to know about calculating gradients, slopes, and linear equations.

In mathematics, the gradient (also known as the slope) of a line measures its steepness and direction. It is defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line. A positive gradient means the line goes uphill from left to right, while a negative gradient means it goes downhill.

To calculate the gradient from two points (x1, y1) and (x2, y2), you use the formula: m = (y2 – y1) / (x2 – x1). First, find the difference in the y-coordinates (the rise), then divide it by the difference in the x-coordinates (the run). This calculator performs this calculation automatically.

If your linear equation is in the slope-intercept form (y = mx + c), the gradient is simply the coefficient of x (the value of m). If the equation is in the general form (Ax + By = C), you can rearrange it to y = (-A/B)x + C/B, meaning the gradient is -A divided by B.

A positive gradient indicates that as the x-values increase, the y-values also increase; the line slopes upwards from left to right. A negative gradient indicates that as x-values increase, y-values decrease; the line slopes downwards from left to right.

The gradient (m) of a line is equal to the tangent of the angle (θ) it makes with the positive x-axis. The relationship is expressed as m = tan(θ). Conversely, you can find the angle using the inverse tangent function: θ = arctan(m). An angle of 0° means a gradient of 0 (horizontal), and 90° means an undefined gradient (vertical).

A gradient is undefined when the line is perfectly vertical. In the formula m = (y2 – y1) / (x2 – x1), a vertical line has the same x-coordinate for all points, meaning the denominator (x2 – x1) is zero. Since division by zero is mathematically undefined, vertical lines do not have a gradient.

Once you have the gradient (m), you can write the equation of the line using the point-slope form: y – y1 = m(x – x1), where (x1, y1) is any point on the line. By rearranging this, you get the slope-intercept form: y = mx + c, where c is the y-intercept (the point where the line crosses the y-axis).

Yes, a gradient of zero means the line is perfectly horizontal. In this case, there is no vertical change (rise = 0) as you move along the line, so m = 0 / run = 0. The equation for a horizontal line is simply y = c, where c is a constant.

Similar Posts

  • Percent Change Calculator 

    Percent Change Calculator 2026 | Percentage Increase & Decrease Online Percent Change Calculator Percent Change Calculator 2026 — Increase & Decrease Find the exact percentage increase or decrease between two values, or apply a percentage change to any starting number — instantly, with a full breakdown of the math. 📊 Percent Change ➕➖ Apply %…

  • Council Tax Calculator

    Council Tax Calculator 2026 | Free UK Bill Estimator & Discounts calculatorsonline.co.uk Council Tax Calculator Calculate your exact UK Council Tax bill for 2026. Enter your property band, local authority rate, and apply discounts like Single Person or Disability Reduction instantly. 🧾 Bill Estimator 📉 Discount Applied 🇬🇧 UK Wide 📱 Mobile Friendly Local Authority…

  • After School Club Cost Calculator for Childcare

    After School Club Cost Calculator UK | Childcare Cost Estimator calculatorsonline.co.uk After School Club Cost Calculator Estimate the cost of after school childcare for your child. Calculate weekly, monthly, and annual costs including hourly rates, additional services, and holiday cover. 🎒 After school care 💷 Accurate estimates 📅 Weekly & monthly costs After School Club…

  • Accountant Salary Calculator

    Accountant Salary Calculator UK | Free Pay Estimator calculatorsonline.co.uk Accountant Salary Calculator Instantly estimate UK accounting salaries based on experience, location, and professional qualifications. Free gross to net pay estimator. 🇬🇧 UK Market Data ⚡ Instant Estimation 💷 Gross & Net Pay 📱 Mobile Friendly Finance Payroll Estimator Calculate Your Earning Potential Enter your professional…

  • Dog Age Calculator

    Dog Age Calculator UK | Convert Dog Years to Human Years calculatorsonline.co.uk Dog Age Calculator Convert your dog’s age to human years instantly. Factor in breed size and the latest veterinary guidelines with our free, accurate tool. 🐾 Accurate Conversion 📏 Size-Based 🇬🇧 Vet Approved 📱 Mobile Friendly Canine Age Converter Calculate Your Dog’s Human…