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.
- Click a numbered tick on the x-axis.
- Click another numbered x-axis tick, far from the first.
- Click a numbered tick on the y-axis.
- Click another numbered y-axis tick, far from the first.
- Click a point on the line, ideally where it crosses grid corners.
- Click a second point on the line, far from A.
Drag a point, or tap the grid to move the nearer point there. Arrow keys nudge the selected point.
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
- Open the photo tab. Choose From a photo above the graph. To practise first, press Use a sample graph.
- 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).
- 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.
- 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. - Do the same on the y-axis (the vertical one): two numbered ticks, far apart, with their numbers.
- 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.
- 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.
- 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
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.5and fractions like1/2both 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
- Find two points where the line crosses grid corners exactly. Exact points give an exact slope.
- Count the run: how far you move left or right from the first point to the second. Right is positive.
- Count the rise: how far you move up or down. Up is positive.
- Slope = rise ÷ run. Simplify the fraction, so 4/6 becomes 2/3.
- Find b where the line crosses the y-axis, or work it out with b = y₁ − m·x₁. Then write y = mx + b.
- 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
- What is slope? Rise over run, explained with pictures.
- The slope formula, with worked examples that include negative numbers.
- Slope-intercept form, y = mx + b
- Finding the equation of a line from a graph
- Practice problems with answers