How to Calculate the Equation of a Line

Make calculations easier for yourself by using a calculator
••• Calculator image by Alhazm Salemi from

Math can be a tricky subject. When studying algebra in high school, it may seem like a subject you'll never need in the real world. However, finding the slope of a line can be useful in real life situations. Slope describes the grade, steepness or incline of something. It can be used to find how steep a road or hill is when traveling. It can also be used to calculate business trends when the slope is used to find the equation of a line.

    Use the points (1,3) and (2,1) to find the equation of an example line. The first number in the pair is the x coordinate the second number in the pair is the y coordinate. Insert both points of the line in the slope formula(m=(y2-y1)/(x2-x1)). Either y-coordinate can be y1 and y2, as long as the x-coordinates for the second part of the equation correspond. For example if y2 equals 3, then x2 must equal 1 in this example.

    Insert the formula into a calculator (you can also solve the problem manually if you prefer). Subtract y1 from y2 (in our problem, solve 3 minus 1). Subtract x1 from x2 (In our problem, solve 1 minus 2). In this problem the solution is 2 divided by -1. When you divide the quantity in this problem you are left with -2. So the slope of the line equals -2.

    Use the slope to find the y-intercept of a line. The y-intercept is represented by the letter b in the equation of a line. Solve for b using the equation y=mx+b. To find b, substitute the slope you found in the previous step (-2) for m. Then substitute one of the points on the line for y and x in the problem. We'll use the point (2,1). Now your problem is 1=-2x2+b.

    Multiply -2 and 2, which equals -4. Now your problem is 1=-4+b.

    Add -4 to both sides of the problem to get b alone. 1+-4 equals -3. So you're left with b=-3.

    Substitute your solutions for m and b into the slope intercept equation (y=mx+b). This gives you y equals 2 multipled by x +-3. Now you can substitute any x point on the line and get the y intercept that corresponds to it.


    • Points with simple numbers may seem easy to calculate manually but sometimes it is easy to make a simple sign mistake. To avoid this it's best to use a calculator.

Related Articles

How to Solve for Both X & Y
How to Figure Out the Slope of a Line
How to Create Linear Equations
How to Find an Equation Given a Table of Numbers
How to Calculate Kf
How to Calculate Slope Using the TI-83 Plus
How to Write the equation of a Linear Function whose...
How to Find a Parallel Line
How to Find the Y-Intercept of a Circle
How to Graph Linear Inequalities
How to Find the Inequalities From a Graph
How to Solve for Sigma on a TI83
How to Find Equations of Tangent Lines
How to Find the Slope in a Circle
How to Get the Value of a Letter in Algebra 1
How to Find Tangent Lines
How to Find Missing Coordinates With Slope
How to Calculate the Distance Between Two Parallel...
How to Find the X Intercept of a Function
How to Find Y Value for the Slope of a Line