The slope of a line describes how steeply it rises or falls as you move along the horizontal axis, and it is one of the most important properties of any straight line in coordinate geometry. Defined as rise divided by run, slope tells you how much the y-value changes for every one unit you move to the right along the x-axis. A slope of 3 means the line climbs three units for each unit of horizontal distance. A negative slope means the line falls. A slope of zero means the line is perfectly flat. An undefined slope indicates a vertical line. This calculator takes the coordinates of two points, (x1, y1) and (x2, y2), and returns the slope, the y-intercept, the x-intercept, and the full equation of the line in slope-intercept form (y = mx + b). It also classifies the line as rising, falling, horizontal or vertical. The slope is calculated as m = (y2 minus y1) / (x2 minus x1). Once you have the slope, the y-intercept follows from b = y1 minus m times x1, and the x-intercept is found by setting y to zero in the line equation. The default example uses (1, 2) and (3, 8), giving a slope of 3 and the line equation y = 3x minus 1. This tool is useful for students studying algebra and coordinate geometry, data analysts finding the gradient of a trend, and engineers or architects working with inclines and gradients. Results are for reference only.
The slope is m = (y2−y1)/(x2−x1). The y-intercept is b = y1 − m×x1, found by substituting either point into y = mx + b and solving for b. The x-intercept is the x value when y = 0: x = −b/m. The direction is rising if m > 0, falling if m < 0, horizontal if m = 0, and vertical if x1 = x2.
Point 1 = (1, 2) and Point 2 = (3, 8) (the default values). Slope m = (8−2)/(3−1) = 6/2 = 3. Y-intercept: b = 2 − 3×1 = −1. X-intercept: x = −(−1)/3 = 0.33. Line equation: y = 3x − 1. The line is rising because the slope is positive.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-19 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.