CalculatorSignAll calculators

Slope Intercept Form Calculator from Two Axis Crossings

Write an exact equation in slope-intercept form using a nonzero x-intercept and y-intercept, then view the line through both crossings.

Slope Intercept Form Calculator from Two Axis Crossings

Result
—

Use this calculator on your site

Paste the full code, including the CalculatorSign credit, into a Custom HTML block on your site.

Preview widget

This slope-intercept form calculator writes the equation of a line from the two places where it crosses the coordinate axes. Enter the nonzero integer x-coordinate of the x-axis crossing and the nonzero integer y-coordinate of the y-axis crossing. The calculator reduces the slope as an exact fraction when needed and plots the resulting line through those two points.

Read the two crossings from a graph

The x-axis crossing has a y-coordinate of zero. If the line meets that axis at (6, 0), enter 6 in the x-intercept field. The y-axis crossing has an x-coordinate of zero. A point at (0, 9) belongs in the y-intercept field as 9. These entries give two distinct points with known coordinates.

Use signed numbers. A line that crosses the x-axis four units to the left of the origin has an x-intercept of −4. A crossing below the origin has a negative y-intercept. A common mistake is to read only the distance from zero and then enter the wrong sign. Look at the direction of each crossing on its own axis.

This model takes one identifiable crossing on each axis away from the origin. If both crossings are at the origin, they give only one point and cannot determine a unique line. A line lying along one of the coordinate axes also has a different crossing description. To apply a generic slope method instead, choose two distinct points on the line with different x-coordinates.

Worked example with crossings at 6 and 9

Suppose the x-intercept is 6 and the y-intercept is 9. The points are (0, 9) and (6, 0). Moving from the first to the second increases x by six and decreases y by nine. The slope is −9 divided by 6, or −3/2 after reducing both terms by three.

The y-intercept supplies the constant term. The slope-intercept form becomes y = −(3/2)x + 9. You can check it by substituting x = 0, which leaves y = 9. Substitute x = 6 and the first term is −9, so the two terms cancel and y = 0. The graph should show both crossings at the original coordinates.

From the y-axis crossing, increasing x by two lowers y by three for this example. Starting at (0, 9), the next point with that step is (2, 6). Repeating the same movement gives (4, 3) and then (6, 0). These are extra checks you can perform directly using the displayed fraction.

How the slope comes from the two inputs

Let a represent the x-intercept and b the y-intercept. Compare (0, b) with (a, 0). The y-change is zero minus b, and the x-change is a minus zero, so the slope is −b/a. The calculation reduces the numerator and denominator using an integer common divisor and keeps the denominator positive in the displayed fraction.

For instance, with x-intercept −4 and y-intercept 10, the slope is −10 divided by −4, which simplifies to 5/2. The equation is y = (5/2)x + 10. It rises as x increases. Substitution at x = −4 gives −10 + 10 = 0, confirming the left-side crossing.

When the slope simplifies to one or negative one, the equation uses x or −x. For example, if both intercept coordinates are 7, the slope is −7/7, so the equation is y = −x + 7. The missing written numeral before x is an understood coefficient of one.

The OpenStax section on writing linear equations explains how to express lines from slope and intercept information. The calculator shows an exact algebraic equation. The rendered graph uses a numerical evaluation of that equation to draw the line within the viewing area chosen around both crossings.

Interpret values between and beyond the crossings

The equation works at x-values on either side of the two intercepts. In the first example, x = 10 gives y = −15 + 9 = −6. Although the point lies beyond the plotted x-intercept, it follows the same constant slope. A classroom sketch only needs to show enough space to illustrate the crossings and direction.

Read the horizontal and vertical tick marks independently. The graph may use a different number of pixels per unit on the two axes so both crossings fit. The fraction in the equation gives the true rate of change even if the screen angle looks steeper or flatter than expected.

Frequently asked questions

Why are the input coordinates required to be integers?

This mode is designed for exact fractions constructed from whole tick marks. If you are working with approximate crossings, use a general slope tool that accepts separately measured decimal coordinates and report their precision.

Which number becomes the constant in the equation?

The y-intercept value becomes the constant term because setting x to zero removes the x term. The x-intercept helps determine the coefficient of x.

Can the line still slope upward when the y-intercept is positive?

Yes. Its direction depends on the sign of −b divided by a. A positive y-intercept and a negative x-intercept give a positive slope.

How can I verify my equation without the chart?

Substitute zero for x and check the y-intercept. Then substitute the given x-intercept and verify that the y-value becomes zero. Both checks should agree with the input points.

OpenStax on writing linear equations from graph information