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

  • Talstar P Mixing Ratio Calculator

    Talstar P Mixing Ratio Calculator | Insecticide Guide calculatorsonline.co.uk Talstar P Mixing Ratio Calculator Calculate the exact amount of Talstar P insecticide needed per gallon or liter of water. Perfect for controlling ants, spiders, roaches, and other pests safely. 🐜 Pests 💧 Water 🧪 Mixing 🛡️ Protection Sprayer & Target Details Enter your water volume…

  • Blackjack Calculator UK

    Blackjack Calculator UK | Bankroll, Odds & Strategy Estimator calculatorsonline.co.uk Blackjack Calculator UK Estimate your expected loss, risk of ruin, and probability of hitting your win target. Factor in bankroll, bet size, game rules, and variance to manage your session like a pro. 🃏 Blackjack 💷 Bankroll 📊 Odds & Variance 🇬🇧 UK Casinos Session…

  • String Tension Calculator

    String Tension Calculator 2026 | Physics & Musical String Tension Estimator calculatorsonline.co.uk String Tension Calculator 2026 Instantly calculate the tension in a vibrating string or musical instrument. Estimate wave speed, linear density, and safety margins with precision. 🎸 Musical Strings 🌊 Wave Speed ⚖️ Tension Force 🛡️ Safety Margin String Properties & Specs Define your…

  • Lambing Calculator UK

    Lambing Date Calculator UK | Sheep Gestation Calculator calculatorsonline.co.uk Lambing Date Calculator Enter your tupping date to calculate the expected lambing date, pregnancy scanning window, housing date, and full pre-lambing management timeline for your flock. 🐑 147-day gestation 📅 Full timeline 🏴󠁧󠁢󠁳󠁣󠁴󠁿 UK farming calendar ⚡ Instant results Lambing Calculator Calculate your lambing dates and…

  • Caster Sugar Cups to Grams Converter

    Caster Sugar Cups to Grams Converter | Baking Measurement Tool calculatorsonline.co.uk Caster Sugar Cups to Grams Converter Instantly and accurately convert baking measurements between cups and grams. Perfect for following any recipe with absolute precision. 🍰 Baking Ready ⚖️ Precise Metrics 🔄 Bidirectional 📱 Mobile Friendly Baking Measurement Tool Convert Your Sugar Measurements Enter your…

  • Drinks Party Budget Calculator

    Drinks Party Budget Calculator | UK Event Cost Estimator calculatorsonline.co.uk Drinks Party Budget Calculator Instantly estimate the quantity and cost of beverages needed for your party, wedding, or event. Accurate, easy, and includes standard wastage allowance. 🇬🇧 UK Currency 🥂 All Event Types ⚡ Instant Estimation 📱 Mobile Friendly Event Cost Estimation Tool Calculate Your…