Calculator
Formula Used
The calculator starts with two points, written as (x1, y1) and (x2, y2).
| Slope | m = (y2 - y1) / (x2 - x1) |
|---|---|
| Y-intercept | b = y1 - mx1 |
| Slope-intercept form | y = mx + b |
| Point-slope form | y - y1 = m(x - x1) |
| Distance | d = √((x2 - x1)² + (y2 - y1)²) |
| Midpoint | ((x1 + x2) / 2, (y1 + y2) / 2) |
If x2 - x1 = 0, the line is vertical. A vertical line has undefined slope and no single y-intercept.
How to Use This Calculator
- Enter the first point as x1 and y1.
- Enter the second point as x2 and y2.
- Add optional prediction values if needed.
- Choose the decimal precision for cleaner answers.
- Press the calculate button.
- Review the slope, intercept, equations, distance, and midpoint.
- Use the CSV or PDF button to save the report.
Use different points to compare line behavior. Try negative values, decimals, vertical lines, and horizontal lines.
Example Data Table
| x1 | y1 | x2 | y2 | Slope | Y-intercept | Equation | Line Type |
|---|---|---|---|---|---|---|---|
| 2 | 3 | 8 | 15 | 2 | -1 | y = 2x - 1 | Rising |
| -4 | 7 | 2 | 1 | -1 | 3 | y = -x + 3 | Falling |
| 1 | 5 | 9 | 5 | 0 | 5 | y = 5 | Horizontal |
| 6 | -2 | 6 | 8 | Undefined | None | x = 6 | Vertical |
Article: Understanding Slope and Y-intercept From Points
What the slope means
Slope shows how fast a line rises or falls. It compares vertical change with horizontal change. The vertical change is called rise. The horizontal change is called run. When the slope is positive, the line rises from left to right. When the slope is negative, the line falls from left to right. A zero slope creates a flat horizontal line. An undefined slope creates a vertical line.
Why the y-intercept matters
The y-intercept is the point where the line crosses the y-axis. It is written as b in the equation y = mx + b. This value helps describe the starting position of the line. It also makes the equation easier to graph. Once slope and intercept are known, any point on the same line can be predicted.
Using two points
Two different points are enough to define one straight line. The calculator subtracts the y-values first. Then it subtracts the x-values. The ratio gives the slope. After that, one point is placed into the equation. This gives the y-intercept. The final equation can then be shown in several forms.
Practical uses
This method is useful in algebra, coordinate geometry, economics, physics, construction, mapping, and data analysis. It can measure speed, price change, growth, decline, and trend direction. A line equation can also support prediction. For example, you can estimate y for a chosen x. You can also solve x for a chosen y.
Checking special cases
Some lines need extra care. A vertical line has the same x-value for both points. Its slope is undefined. It has no single y-intercept unless it lies on the y-axis. A horizontal line has the same y-value for both points. Its slope is zero. This calculator detects these cases and explains the result clearly.
FAQs
1. What is slope?
Slope is the ratio of vertical change to horizontal change. It shows how steep a line is and whether it rises or falls.
2. What is the y-intercept?
The y-intercept is where the line crosses the y-axis. In y = mx + b, it is the value of b.
3. Can two points always create a line?
Yes. Two points create one straight line when they are distinct. If both points are identical, infinitely many lines can pass through them.
4. What happens when x1 equals x2?
The line is vertical. Its slope is undefined because the denominator in the slope formula becomes zero.
5. What happens when y1 equals y2?
The line is horizontal. Its slope is zero, and the equation becomes y equals the shared y-value.
6. Can decimals and negative numbers be used?
Yes. The calculator accepts decimals, negative values, and zero. It also lets you control decimal precision.
7. What does point-slope form show?
Point-slope form shows the line using one known point and the slope. It is useful for algebra steps.
8. Why download CSV or PDF results?
CSV is useful for spreadsheets. PDF is useful for reports, assignments, notes, and printable records.