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
0Horizontal
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

  • Compound Interest Calculator UK

    Compound Interest Calculator UK | Savings & Investment Growth Tool calculatorsonline.co.uk Compound Interest Calculator UK Calculate the future value of your savings and investments. Factor in monthly contributions, interest rates, and compounding frequency to see your money grow. 💷 UK Savings 📈 Investments 🏦 ISA 📊 Growth Investment & Savings Details Enter your initial deposit,…

  • Natural Algortihms Calculator

    Natural Algorithms Calculator | Explore Nature-Inspired Optimisation calculatorsonline.co.uk Natural Algorithms Calculator Simulate and compare nature-inspired optimisation algorithms. Explore how genetic evolution, ant colonies, particle swarms, and simulated annealing solve complex problems. 🧬 Genetic Algorithm 🐜 Ant Colony Optimisation 🌊 Particle Swarm 🔥 Simulated Annealing Algorithm Parameters Configure the algorithm and problem to analyse performance Algorithm…

  • Child Maintenance Arrears Calculator

    Child Maintenance Arrears Calculator | Unpaid Maintenance Estimator calculatorsonline.co.uk Child Maintenance Arrears Calculator Instantly estimate total unpaid child maintenance, missed payments, and outstanding balances to help manage family finances and plan repayment. 👨‍👩‍👧 Family Support ⚖️ Accurate Estimates 📉 Arrears Tracking 📱 Mobile Friendly Financial Estimation Tool Calculate Your Outstanding Arrears Enter your child maintenance…

  • Cornerstone Plus Mix Calculator

    Cornerstone Plus Mix Ratio Calculator | Glyphosate Herbicide Mix calculatorsonline.co.uk Cornerstone Plus Mix Calculator Calculate the exact mix ratio of Cornerstone Plus (Glyphosate) per gallon of water. Perfect for weed control, brush management, and vegetation management. 🌿 Weed Control 💧 1 Gallon 🧪 Glyphosate 🎯 Per 1,000 sq ft Tank Mix & Application Details Enter…

  • Childcare Cost Calculator

    Childcare Cost Calculator UK 2026 | Nursery & Childminder Rates calculatorsonline.co.uk Childcare Cost Calculator Estimate the weekly, monthly, and annual costs of nurseries, childminders, and nannies in the UK. Check your eligibility for free hours and Tax-Free Childcare. 💷 Weekly & Monthly Costs 🏫 Nursery vs Childminder 🕒 30 Hours Free 📊 Regional Rates Childcare…

  • Diagonal Calculator

    Diagonal Calculator 2026 | Rectangle, Square & Cube Diagonal Finder calculatorsonline.co.uk Diagonal Calculator 2026 Instantly calculate the diagonal length of rectangles, squares, cubes & cuboids. Perfect for construction, design, and geometry projects with step-by-step formulas. 📐 Multi-Shape 📏 Multi-Unit 🔢 Step-by-Step 🏗️ Construction Ready Shape & Dimensions Select a shape and enter its measurements 📐…