Slope of a line
Find slope and y-intercept from two points.
Estimate a value between two known readings using a straight line.
Estimate a value between two known readings using a straight line.
y1+(y2-y1)*(x-x1)/(x2-x1)100*(x-x1)/(x2-x1) %The second position must exceed the first and the target must lie between them. A curved trend can differ from the straight-line estimate.
Results are rounded for display; calculations use unrounded values. Read our calculation methodology.
Estimate a value between two known readings using a straight line. A target at 10 between positions 0 and 40 lies one quarter of the way across. Readings of 10 and 30 give an estimate of 15.
A target at 10 between positions 0 and 40 lies one quarter of the way across. Readings of 10 and 30 give an estimate of 15.
| Input | Example |
|---|---|
First position x1 | 0 |
First value y1 | 10 |
Second position x2 | 40 |
Second value y2 | 30 |
Target position x | 10 |
The second position must exceed the first and the target must lie between them. A curved trend can differ from the straight-line estimate.
Use the values in the worked example and keep consistent units throughout the calculation.