Use a known slope and a point on a line to estimate y at a second x coordinate. Then enter the observed y value at that second x to see the difference between the observation and the projection. The calculator shows the projected y first and lists the signed difference and the implied y-intercept below it.
The first x and y pair is the anchor. Choose a point the line is intended to pass through. Enter the slope in y units per x unit. For example, a rise of six centimeters over four minutes means a slope of 1.5 centimeters per minute. The x entries in that example must use minutes and the y entries must use centimeters.
Project from the point you already know
Subtract the anchor x from the target x to get the horizontal change. Multiply that change by the slope. The product tells you how far to move up or down from the anchor y. Add that amount to the anchor y to get the projected result. The same rule works if the target x is smaller than the anchor x, because the horizontal change then carries a negative sign.
This is an application of point-slope form. You can write the relationship as y equals the anchor y plus the slope times the difference between x and the anchor x. Unlike the intercept form, it lets you start with a reference value at any usable x. That is convenient when your original record never includes x equal to zero.
To find the y-intercept, apply the projection rule at zero. This gives the anchor y minus the slope times the anchor x. The calculator shows that figure even when zero is far outside the x values you are studying. Treat it as the intercept of the mathematical line and decide separately whether that location is meaningful in your case.
Worked check of an observation at x equals eight
Enter slope 2.4, anchor x of 3 and anchor y of 7. Set the second x to 8 and the observation to 20.5. The horizontal change is five units. At 2.4 units of y per x unit, the projected increase is 12. Add that increase to the anchor y of 7 to get a projected y of 19.
The signed difference of observation minus projection is 20.5 minus 19, which equals 1.5. That means the observation sits 1.5 y units above the line at x equal to eight. The intercept is 7 minus 2.4 times 3, giving negative 0.2.
Change the target x to 1 while keeping the anchor and slope the same. The horizontal change goes from positive five to negative two. The projected change in y is negative 4.8, so y is 2.2. If the observation at x equals one were 2, that signed difference would be negative 0.2. The sign identifies which side of the line the record falls on at that particular x.
Interpret a residual in its original units
The signed difference is sometimes called a residual. It is the vertical separation calculated at the x position you entered. If y measures dollars, the difference is also in dollars. The calculator does not measure the shortest geometric distance between the point and the line. That distance would depend on the scaling and units of both axes.
If you are checking several observations against the same line, repeat with each observed x and y while keeping the original anchor and slope. A single point can be above the line even when another is below it. Save the differences with their x coordinates if you want to compare how the relationship behaves across the interval.
Check the effect of moving far away from the anchor. If the slope is estimated and slightly off, multiplying by a large horizontal difference can magnify the projection error. A line that matches observations near its anchor can diverge at distant x values. Examine the original evidence for a steady slope when you use the projection outside the observed range.
If the initial relationship is nonlinear, a straight line may still approximate how a measurement changes near an anchor. This tool extends the same entered slope throughout the range, so it is worth labeling the interval over which the slope was observed or assumed.
Frequently asked questions
Can I find the slope from the second observation entered here?
The calculator uses a supplied slope and reports how the observation compares with it. To estimate a slope directly from two observations, divide the change in y by the change in x or use the linked two-point tool.
What does a zero slope produce?
Every x has the same projected y as the anchor. The observed difference is then the observation minus that constant.
What if the observed x matches my anchor x?
The horizontal change is zero and the projected value equals the anchor y. A difference can still appear if you enter an observation at that x that has a different y.
Can I use the projection for a vertical line?
A vertical line gives many y values at one x and does not have a finite slope for these inputs. Use its fixed x value to describe it.