Slope Finder

Find the slope and the equation of a straight line from two points, from a graph you set up here, or from a photo of a graph in your homework. Every answer shows its working, so you can check your own method as well as your answer.

Drag a point, or tap the grid to move the nearer point there. Arrow keys nudge the selected point.

A
B

Slope

Equation of the line

How to use Slope Finder

Finding a line’s equation from a photo

Use this when your graph is on paper, in a textbook, on a worksheet or in a screenshot. You tell the page where two numbers sit on each axis, so it can work out the scale of your picture. Then you click two points on the line and it does the rest.

Step by step

  1. Open the photo tab. Choose From a photo above the graph. To practise first, press Use a sample graph.
  2. Add your picture. Press Choose photo (on a phone this can open the camera), drag an image file onto the board, or copy a screenshot and paste it with Ctrl+V (⌘+V on a Mac).
  3. Mark a numbered tick on the x-axis (the horizontal one). Click exactly where the tick mark meets the axis, not on the printed number below it. A box appears on the photo: type the number printed at that tick and press Enter or OK.
  4. Mark a second x-axis tick and type its number. Pick one as far from the first as you can. The further apart they are, the more accurate the scale. Negative numbers are fine: type them with a minus sign, such as -4.
  5. Do the same on the y-axis (the vertical one): two numbered ticks, far apart, with their numbers.
  6. Click a point on the line. The best spots are where the line passes exactly through a grid corner, because those points have whole-number coordinates. This is point A.
  7. Click a second point on the line, well away from A. This is point B. The page draws its line over your photo, so you can see whether it follows the printed one.
  8. Read your answer on the right: the slope, the working, and the equation in three forms. Under the photo, Read from the photo shows the exact readings before rounding, such as A ≈ (−2.97, −0.96).

Adjusting your marks

  • Drag any mark (an axis tick, A or B) to move it. The answer updates as you drag.
  • Once all six marks are placed, clicking an empty spot on the photo moves whichever of A or B is nearer.
  • To fix a tick’s number, edit it in the numbered steps above the photo.
  • Start marking again removes every mark but keeps the tick numbers you typed, which is handy for a second graph on the same worksheet.

Taking a good photo

  • Hold the camera straight above the page, so the grid squares look square and the axes look level. A tilted or angled photo stretches the scale and gives wrong answers.
  • Get the numbers on both axes and the part of the line you need into the frame.
  • Use good light and keep shadows and glare off the line. Crop away the rest of the page if you can.
  • For a graph on a screen, take a screenshot rather than a photo of the screen. It is perfectly straight.

The ticks don’t have to count by 1

If the axis is numbered 0, 5, 10, 15, or 0, 0.5, 1, just type the numbers printed at the ticks you clicked. The page works out how big each square is from those numbers.

Choosing “Round readings to”

  • Whole numbers (the default) suit most homework graphs, where the line passes through grid corners.
  • Halves, quarters or tenths suit graphs whose points sit between whole numbers.
  • Off keeps two decimals. Use it for real data or a line that doesn’t pass through clear grid points. The slope then becomes a fraction like 67/100.

If the answer looks wrong

The slope is close but not neat, such as 0.68 when you expected 2/3.Check that Round readings to is set to whole numbers. Then drag A and B onto points where the line crosses grid corners exactly.
The slope has the wrong sign.Check that the x ticks are on the horizontal axis and the y ticks on the vertical one, and that negative tick numbers have their minus sign.
The page says “The two ticks on each axis need different values”.You typed the same number for both ticks on one axis. Fix it in the steps list.
The blue line doesn’t follow the printed line.A or B is off the line. Zoom in on your phone or computer if that helps, and drag the point back onto the line.
The photo won’t open.iPhones save photos as HEIC, which many browsers can’t read. Take a screenshot of the photo and use that, or set the camera to Most Compatible in iPhone Settings → Camera → Formats.

Your photo is never uploaded. It stays in your own browser and is gone when you close the page.

Using the grid

  • Drag point A (red) or B (green) to where the line passes. You can also tap the grid and the nearer point jumps there.
  • Type coordinates into the boxes under the graph. Decimals like 2.5 and fractions like 1/2 both work. The grid widens if a number goes past its edge.
  • Snap to sets where points can land: whole numbers, halves, quarters, tenths, or anywhere.
  • Grid changes the range shown, from −5 to 5 up to −20 to 20.
  • With a keyboard, press Tab to select a point, then use the arrow keys to nudge it.
  • Rising, Falling, Flat and Vertical load an example of each kind of line.
  • Copy next to each equation copies it as plain text, such as y = (3/4)x + 1/2.

Which form of the equation do I need?

  • Slope-intercept y = mx + b. m is the slope and b is where the line crosses the y-axis. It is the most common form and the easiest one to graph from.
  • Point-slope y − y₁ = m(x − x₁). Built from point A and the slope. It is the quickest form to write when you know one point and the slope.
  • Standard Ax + By = C. Whole numbers only, with A not negative. Textbooks often ask for this form.
  • Vertical lines go straight up and down. Their equation is x = c and their slope is undefined.
  • Horizontal lines are flat. Their equation is y = c and their slope is 0.

Reading slope off a graph by hand

  1. Find two points where the line crosses grid corners exactly. Exact points give an exact slope.
  2. Count the run: how far you move left or right from the first point to the second. Right is positive.
  3. Count the rise: how far you move up or down. Up is positive.
  4. Slope = rise ÷ run. Simplify the fraction, so 4/6 becomes 2/3.
  5. Find b where the line crosses the y-axis, or work it out with b = y₁ − m·x₁. Then write y = mx + b.
  6. Check: a line going up from left to right has a positive slope, and one going down has a negative slope.

Learn more about slope

Working with two lines? The Intersection Finder shows where they cross and solves the system by substitution or elimination. For quadratic equations, the Quadratic Solver shows the solutions by factorising, the quadratic formula or intersecting lines. For data, the Line of Best Fit calculator finds the trend line and its slope.