Math Calculator

Slope Calculator

Find slope and inspect the line.

Slope inputs

Find the line and check both points.

Signed decimal, scientific e notation or integer fraction.

Entry and display options

Each mode keeps its own source inputs when you switch.

Signed decimal, scientific e notation or integer fraction.

Signed decimal, scientific e notation or integer fraction.

Signed decimal, scientific e notation or integer fraction.

Load a point-pair example

Display precision never changes exact slope, classification or incidence checks.

Use compatible coordinate units for a physical angle, grade or distance. Sources retain sixty significant decimal digits or sixty digits per integer fraction, with scientific input exponents from negative one hundred through positive one hundred. Exact numerators and denominators are bounded to eighteen hundred digits. Rational decimal views use half-away-from-zero rounding; angles, distances and plot positions are numerical approximations.

Increasing line; positive slope

m=2m=2

Decimal slope

m=2m=2

Exact coordinate arithmetic determines the line and special cases. A vertical line has an undefined slope; coincident points do not determine a unique line. Rounded displays never replace those distinctions.

Line equations and directions

Normalized standard form

2x−y=02x-y=0

Slope-intercept form

y=2xy=2x

Point-slope form

y−(2)=2(x−(1))y-\left(2\right)=2\left(x-\left(1\right)\right)

Parallel line slope

m∥=2m_{\parallel}=2

Perpendicular line direction

m⊥=−12m_{\perp}=-\frac{1}{2}

Distance and angle

d=80d=\sqrt{80}
d≈8.944272×100d\approx 8.944272\times10^{0}

Signed slope angle, then line inclination, in degrees:

θ≈63.434949∘,α≈63.434949∘\theta\approx 63.434949^{\circ},\quad\alpha\approx 63.434949^{\circ}

The signed slope angle is measured relative to the positive horizontal direction, between negative and positive ninety degrees. Inclination is the equivalent undirected line angle from zero inclusive to one hundred eighty exclusive; a vertical line has ninety degrees. These are approximate numeric values, and endpoint-adjacent angles can round to an endpoint.

Line graph and rise/run

Line, point pair, horizontal run and vertical riseEqual units on both axes. A solid line passes through the two marked points; dashed legs show horizontal and vertical changes. The viewport is centered on the point-pair midpoint; an axis outside that window is omitted. All coordinates and exact line values are available in the calculation table.FirstSecondHorizontal coordinateVertical coordinate

Solid line: the calculated line. Dashed legs: horizontal run, then vertical rise. Circle: first point. Square: second point.

Viewport center: (3,6)\left(3,6\right).
Equal coordinate units per grid step: 43\frac{4}{3}.

The view follows the point pair; axes outside this window are omitted. Plot positions are numerical approximations, so extreme directions can appear horizontal or vertical at screen resolution. Mathematical answers use the exact values.

Slope calculation step by step

  1. Record both points

    P1=(1,2),P2=(5,10)P_1=\left(1,2\right),\quad P_2=\left(5,10\right)

    Keep the same point order for both coordinate differences. In a constructed-point mode, the source record explains the chosen reference pair.

  2. Calculate horizontal and vertical changes

    Δx=5−(1)=4,Δy=10−(2)=8\Delta x=5-\left(1\right)=4,\quad\Delta y=10-\left(2\right)=8

    Exact rational subtraction preserves small differences even when source coordinates have many digits.

  3. Divide rise by nonzero run

    m=ΔyΔx=84=2m=\frac{\Delta y}{\Delta x}=\frac{8}{4}=2

    Reduce the quotient exactly. Reversing both points reverses both differences and preserves this ratio.

  4. Find the vertical-axis intercept

    b=2−(2)(1)=0b=2-\left(2\right)\left(1\right)=0

    Subtract the product of slope and the first horizontal coordinate from the first vertical coordinate. This calculation applies only to finite slopes.

  5. Check the line at both points

    2x−y=0,r1=0,r2=02x-y=0,\quad r_1=0,\quad r_2=0

    Substitution of each point into the normalized standard equation produces an exact zero residual, including for vertical and horizontal lines.

  6. Keep geometric approximations separate

    d=(Δx)2+(Δy)2=80d=\sqrt{(\Delta x)^2+(\Delta y)^2}=\sqrt{80}

    Segment distance assumes equal, compatible units on both axes. Angles use numerical inverse trigonometry; their displayed precision does not change the exact line equation.

Inputs saved with this calculation

Calculation mode
Two points
Active numeric sources
First horizontal coordinate: 1; First vertical coordinate: 2; Second horizontal coordinate: 5; Second vertical coordinate: 10
Rounded decimal places
6
Show graph
true

All result details

Exact coordinates, differences, normalized coefficients, finite slopes and available intercepts are retained in this complete table. A missing intercept can represent no intersection or an entire coincident axis, as explained above. Each defined line has exact zero incidence checks at both displayed points. CSV retains every exact digit.

Slope calculation details
QuantityExact valueRounded decimalInterpretation
First horizontal coordinate1111Coordinates of the entered or explicitly constructed point pair.
First vertical coordinate2222Coordinates of the entered or explicitly constructed point pair.
Second horizontal coordinate5555Coordinates of the entered or explicitly constructed point pair.
Second vertical coordinate10101010Coordinates of the entered or explicitly constructed point pair.
Horizontal change4444Second horizontal coordinate minus first horizontal coordinate.
Vertical change8888Second vertical coordinate minus first vertical coordinate.
Squared segment distance80808080Exact square of the distance between the displayed point pair, using equal coordinate units.
Normalized horizontal coefficient2222Primitive integer coefficient; the first nonzero variable coefficient is positive.
Normalized vertical coefficient−1-1−1-1Primitive integer coefficient in the normalized line equation.
Normalized right-side constant0000The same scaling is applied to all three line coefficients.
Exact slope2222Vertical change divided by the nonzero horizontal change.
Signed percent grade200200200200Slope multiplied by one hundred; meaningful as physical grade only with compatible axis units.
Vertical-axis intercept0000The line value when the horizontal coordinate is zero.
Horizontal-axis intercept coordinate0000The horizontal coordinate where the vertical coordinate is zero.
Perpendicular line slope−12-\frac{1}{2}−0.5-0.5Negative reciprocal; the exact product of the two slopes is negative one.
First point verification difference0000Normalized left-side line value minus its right-side constant at the first point.
Second point verification difference0000Normalized left-side line value minus its right-side constant at the second point.
What Can You Create?

Connect coordinate changes with the line they describe

Slope from the information you actually have

Start with two complete points, a displacement, one point and a finite slope, or standard line coefficients. The active input mode determines the calculation and documents any constructed reference points. Six worked point-pair examples illustrate increasing, decreasing, fractional, horizontal, vertical and coincident cases. Source strings stay independent across modes, making it possible to compare approaches without silently replacing the original problem.

Equivalent line equations and exact checks

Keep the reduced slope, slope-intercept equation, point-slope equation and primitive integer standard equation together. Available intercepts and parallel or perpendicular directions add useful context. Every defined line is checked by substituting both displayed points into its standard equation. The table retains the exact residuals, while decimal formatting remains a presentation choice rather than an input to the algebra.

A graph that supports the numerical result

Inspect the solid line, two distinct point markers and dashed horizontal and vertical legs in an equal-unit square viewport. Exact centered differences are calculated before positions are converted for plotting, which avoids losing a small separation between large coordinates. The caption identifies the midpoint, grid-step units and any omitted axes. The exact output remains the authority when a directional component is smaller than visible screen resolution.

Formulas and worked examples

Slope formulas and step-by-step examples

Subtract coordinates in a consistent order

For P1=(1,2)P_1=(1,2) and P2=(5,10)P_2=(5,10), the horizontal change is 5−1=45-1=4 and the vertical change is 10−2=810-2=8. The quotient is exact before choosing a decimal view. Reversing the points negates both differences, giving the same line direction.

m=y2−y1x2−x1=10−25−1=84=2m=\frac{y_2-y_1}{x_2-x_1}=\frac{10-2}{5-1}=\frac{8}{4}=2

Build the line and check both points

With finite slope m=2m=2, compute the intercept b=y1−mx1=2−2(1)=0b=y_1-mx_1=2-2(1)=0. The resulting equation is y=2xy=2x, or equivalently 2x−y=02x-y=0. Substitution of either entered point produces the same exact right-side constant. A standard equation also provides an incidence check when a slope-intercept form is unavailable.

2(1)−2=0,2(5)−10=02(1)-2=0,\qquad 2(5)-10=0

Keep fractional coordinates exact

Consider P1=(1/3,−1/2)P_1=(1/3,-1/2) and P2=(5/6,3/4)P_2=(5/6,3/4). The run is 1/21/2 and the rise is 5/45/4, so the exact slope is 5/25/2. Prematurely rounding either coordinate changes the input problem. The calculator instead reduces the rational differences and forms the line from their exact quotient.

m=34−(−12)56−13=5412=52,y=52x−43m=\frac{\frac34-\left(-\frac12\right)}{\frac56-\frac13}=\frac{\frac54}{\frac12}=\frac52,\qquad y=\frac52x-\frac43

Check the division condition and degenerate inputs

The quotient requires Δx≠0\Delta x\ne0. If only the run is zero, a distinct point pair determines a vertical line. If both changes vanish, no unique line follows. For coefficient entry, Ax+By=CAx+By=C defines a line only when at least one variable coefficient is nonzero. The cases 0x+0y=00x+0y=0 and 0x+0y=10x+0y=1 describe the whole plane and the empty set respectively.

Δx=0, Δy≠0⟹x=x1;Δx=Δy=0⟹no unique line\Delta x=0,\ \Delta y\ne0\Longrightarrow x=x_1;\qquad \Delta x=\Delta y=0\Longrightarrow\text{no unique line}

Interpret grade, angle and distance with compatible units

For a finite slope, percent grade is 100m100m and the signed slope angle is θ=arctan⁡(m)\theta=\arctan(m). Thus the default example has grade 200%200\% and signed angle approximately 63.434949∘63.434949^{\circ}. Its exact point separation is 80=45\sqrt{80}=4\sqrt5. These angle and distance interpretations assume compatible coordinate units. A steep line need not represent a sensible road or physical structure; the calculator does not impose that external meaning.

d=(5−1)2+(10−2)2=80=45d=\sqrt{(5-1)^2+(10-2)^2}=\sqrt{80}=4\sqrt5
Why Users Love This Tool

Keep undefined cases, assumptions and precision visible

Exact decisions before decimal formatting

  • Finite decimals and integer fractions are retained as rational values throughout coordinate subtraction and line construction.
  • A tiny nonzero run remains different from an exact zero, even when its displayed decimal would round to zero.
  • Vertical lines, coincident points, the whole plane and an inconsistent coefficient equation receive distinct outcomes.
  • Both point-incidence checks must be exactly zero; similar rounded coordinates are not used as proof.

A complete record for checking the interpretation

  • Mode notes identify an origin-anchored direction or constructed reference segment before it is treated as a measured line.
  • Intercept explanations distinguish a missing crossing from an entire axis coinciding with the line.
  • Exact percent grade stays separate from approximate angles, numerical distance and plot coordinates.
  • Saved sources, full CSV and typeset printing preserve the conditions needed to reproduce the result.
Perfect For

Coordinate geometry for learning, teaching and model checks

Students learning rate of change

Follow the two coordinate differences before dividing, and compare the resulting slope with the direction on the graph. Swapping points illustrates why reversing both differences leaves the ratio unchanged. Contrast horizontal, vertical and coincident examples to understand why zero and undefined are different. Use the line-incidence checks to connect a calculated equation back to the points that motivated it.

Teachers comparing line representations

Move between two-point, point-and-slope and coefficient descriptions while explaining the reference data each method supplies. Fractional coordinates demonstrate exact arithmetic, and degenerate coefficient equations show why checking conditions must come before division. A printable source record supports classroom discussion. The graph is a mathematical illustration with equal coordinate units, and its caption makes the local viewport explicit instead of moving axes to convenient positions.

People checking a linear relationship

Use coordinates from a defined model to inspect its rate of change, intercepts and direction. Confirm the meaning and units of each coordinate before interpreting a numerical slope as a physical grade or angle. The calculator checks the entered mathematics; it does not decide whether measured data follow a straight line. Preserve the source record when using a constructed reference pair, rounded measurements or a line equation obtained elsewhere.

How It Works

How it works in three quick steps.

1

Choose the source information and enter exact values

Select two points, rise and run, a known point with a finite slope, or coefficients of a standard line equation. Enter signed decimals, scientific notation or integer fractions in each active field. Keep compatible coordinate units when interpreting physical angles or distances. Each mode retains its own inputs, so switching methods does not silently translate a direction into an assumed measured line.

2

Review slope, special cases and the line preview

Read the exact slope and its separate rounded decimal view. Inspect the line equations, available intercepts, perpendicular direction and exact point-incidence checks. Vertical lines and coincident points have different meanings; a coefficient equation can also represent the whole plane or no points. The optional graph uses equal horizontal and vertical coordinate units and follows the selected or constructed point pair.

3

Inspect the working and keep the source record

Follow the coordinate subtraction, division condition, intercept calculation and substitution into the standard line equation. Compare the exact table with the angle and distance approximations before using them. Copy the summary, share editable active sources, download the complete CSV or print the typeset method. The browser print dialog can save a PDF containing the source values, geometry and verification record.

Download & Print

Save the source values alongside their geometry

Download the full exact record

CSV contains the active input sources, classification, line forms, method notes, every exact table fraction and separately identified geometric approximations. Long numerator and denominator values remain complete. This makes the file suitable for inspecting a borderline vertical case or a large-coordinate difference that would be obscured by a short decimal summary. Display precision does not shorten the exact exported values.

Print typeset working or save a PDF

Print removes navigation and editing controls while retaining source settings, solution classification, line equations, the optional graph, worked steps and the native result table. Select a suitable orientation and Save as PDF in the browser. Very long expressions use an explicit compact notice rather than being silently clipped; keep the CSV with the PDF when complete exact digits exceed a readable printed line.

Share an editable example

A shared link retains the active source group, decimal precision and graph visibility in its fragment. Someone opening it can inspect the same original strings and change the problem. Internal section navigation leaves the shared configuration intact. A link containing malformed numeric sources, duplicate settings or hidden inactive input groups is rejected, so incomplete imported state cannot silently overwrite the current calculation.

FAQ

Frequently Asked Questions

How do I calculate slope from two points?
Subtract the first horizontal coordinate from the second to obtain Δx=x2−x1\Delta x=x_2-x_1. Subtract the first vertical coordinate from the second to obtain Δy=y2−y1\Delta y=y_2-y_1. If the horizontal change is nonzero, divide to get m=Δy/Δxm=\Delta y/\Delta x. Keep the same point order for both differences. The calculator retains exact fractions, constructs a line equation and substitutes both points into it, rather than deciding correctness from a rounded slope display.
What is the difference between zero, undefined and no unique slope?
A horizontal line has Δy=0\Delta y=0 and Δx≠0\Delta x\ne0, so its slope is exactly zero. A vertical line has Δx=0\Delta x=0 and Δy≠0\Delta y\ne0, so division by the horizontal change is undefined. When both changes are zero, the two points coincide. One point belongs to many possible lines, so the input does not determine a unique slope or direction. These outcomes are classified using exact values before any decimal display rounding.
Can I use fractions, negative coordinates and scientific notation?
Yes. Each active numeric field accepts signed finite decimals, scientific e notation or a signed integer fraction with a nonzero denominator. Negative denominators are normalized consistently. Decimal sources retain up to sixty significant digits and input scientific exponents from negative one hundred through positive one hundred; integer fractions retain sixty digits per integer. Each source is limited to one hundred eighty characters. Commas, expressions and recurring-decimal syntax are unsupported; use a deliberate finite decimal or exact integer fraction instead.
What does rise-and-run mode assume about the line?
Rise and run specify a displacement direction, which can belong to many parallel translated lines. To show a concrete line equation and graph, this mode explicitly chooses the origin as its first point and the entered run and rise as its second point. The source note records that choice. If you know a real location on the intended line, use two-point or point-and-slope entry instead. A zero displacement does not establish a direction, angle or unique line.
How does the calculator handle a standard line equation?
Enter coefficients in Ax+By=CAx+By=C. When B≠0B\ne0, the finite slope is m=−A/Bm=-A/B and the vertical-axis intercept is C/BC/B. When B=0B=0 and A≠0A\ne0, the line is vertical with equation x=C/Ax=C/A. If both variable coefficients are zero, the equation represents either the whole plane or no points, depending on the constant. The calculator constructs a stated reference point pair for a valid line and normalizes its standard coefficients to primitive integers.
How are intercepts and perpendicular slopes interpreted?
For a finite slope, write y=mx+by=mx+b. The vertical-axis intercept is bb, and a nonzero slope gives horizontal-axis intercept −b/m-b/m. A horizontal line can miss the horizontal axis or coincide with it entirely, so a unique horizontal-axis intercept is not always available. A nonzero finite slope has perpendicular slope −1/m-1/m. A horizontal line has vertical perpendicular direction, while a vertical line has horizontal perpendicular direction. Parallel direction preserves the original slope or vertical classification.
Are percent grade, angle and distance exact measurements?
Signed percent grade is the exact rational quantity 100m100m when slope is finite. It is a physical grade only when the axis units are compatible. The signed slope angle uses inverse trigonometry and is an approximation; line inclination expresses the same undirected line direction between zero and one hundred eighty degrees. Distance retains the exact expression d=(Δx)2+(Δy)2d=\sqrt{(\Delta x)^2+(\Delta y)^2} and a numerical approximation. These quantities describe the displayed reference pair when a mode constructs its points.
Why can the graph omit an axis or look almost horizontal or vertical?
The square graph follows the point-pair midpoint and uses equal coordinate units horizontally and vertically. If the origin lies outside that local window, the corresponding coordinate axis is omitted rather than relocated. Exact centered differences are computed before numeric plotting, preserving nearby points with large coordinate values. Screen positions still have finite resolution: an extremely small directional component can visually disappear. Read the exact slope, source coordinates and line equation for mathematical classification, rather than inferring it from pixels.
Does swapping points or changing decimal places change the answer?
Swapping two distinct points reverses both coordinate differences and preserves the same line and slope. The signed angle convention follows the line with positive horizontal direction, so the displayed line angle is also preserved. Changing decimal places only changes rational decimal presentation; it never changes the exact slope, standard coefficients, intercepts or incidence checks. Rational displays use half-away-from-zero rounding, and scientific notation keeps extreme nonzero values distinguishable from a rounded zero. Numeric angle and distance approximations are explicitly separate.
Can I share, download or print the complete calculation?
Share calculation copies an editable URL fragment containing only the active source group and common display options. The full original source strings are retained, and malformed, duplicate or inactive shared fields are rejected. Copy summary records line forms, exact table fractions, approximate geometry and method notes in plain text. CSV keeps every exact digit, including long values. Print removes editing controls and restores the complete calculation; choose Save as PDF in the browser. Exceptionally long print expressions use a notice directing you to the full CSV.
About This Tool

About this exact slope and line calculator

This slope calculator connects several common descriptions of a straight line while preserving the source information behind each result. Two-point entry begins with actual coordinates. Rise-and-run entry begins with a direction and deliberately anchors its illustrative line at the origin. Point-and-slope entry constructs a second reference point using a horizontal change of one. Standard coefficient entry derives a convenient reference pair from the equation. Those differences matter when interpreting a displayed intercept, distance or graph as part of a real problem.

Supported numeric sources are converted into exact rational values before subtraction, division or line normalization. The reduced slope, intercepts, percent grade, standard coefficients and incidence residuals therefore do not depend on floating-point coordinate rounding. The tool checks both displayed points against the derived line equation. A separate decimal layer provides readable approximations without altering the classification. Angles use numerical inverse trigonometry; segment distances retain an exact radical expression alongside their numerical view. The graph converts centered exact ratios into screen positions and discloses its finite visual resolution.

The page also explains the limits of the model. A vertical line does not have a finite slope, a repeated point does not establish a unique line, and zero variable coefficients may fail to define any line at all. Compatible axis units are required for physical distances and geometric angle interpretations. The tool does not fit a trend through noisy observations or validate external measurements. Source-preserving sharing, complete CSV and print output help keep these assumptions attached to a result when it is reused, taught or checked independently.

Editorial Transparency

Who maintains this page

Ownership and review

Written and maintained by the Toolarithm editorial team. No review date is shown without a maintained editorial record. No independent professional review is claimed.

Methodology

Equations are checked by substituting worked examples into the stated relationship and comparing the result with the interactive implementation.

Read the editorial methodology

Dates and sources

Review dates change only after a substantive method or content check.

Keep building

Explore more calculators

Calculators hub