两点求斜率计算器
由两点求斜率、y 轴截距、直线方程、倾斜角、距离和中点。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
Given two points on a line, you can find everything about it. This calculator returns the slope (as a decimal and a fraction), the y-intercept and the equation in slope-intercept form, the angle the line makes with the x-axis, the x-intercept, the distance between the points and the midpoint. Vertical lines, whose slope is undefined, are reported correctly as x = constant.
使用方法
- Enter the coordinates of the first point (x₁, y₁).
- Enter the coordinates of the second point (x₂, y₂).
- Run the calculation.
- Use the equation, angle, distance or midpoint as your problem requires.
计算原理
m = (y₂ − y₁) ÷ (x₂ − x₁); b = y₁ − m·x₁; angle = atan(m) in degrees; distance = √((x₂ − x₁)² + (y₂ − y₁)²); midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2).
m = (y₂ − y₁) ÷ (x₂ − x₁)计算示例
For the points (−3, 4) and (5, 0), the slope is −0.5 (−1/2), the y-intercept 2.5 and the line y = −0.5x + 2.5. It descends at −26.5651°, crosses the x-axis at 5, and the points are 8.944272 units apart with midpoint (1; 2). The points (2, 5) and (2, 9) give the vertical line x = 2.
示例输入和结果
x₁: 1 y₁: 2 x₂: 4 y₂: 11 → 斜率(m): 3 → y 轴截距(b): -1 → 公式: y = 3x − 1 → 与 x 轴的夹角: 71.5651° → x 轴截距: 0.333333 → 两点间距离: 9.486833
局限性
- Two points in a plane.
- Decimal coordinates up to ±1 trillion.
- Fractions are shown for the slope where they are simple.
最后更新:
常见问题
What does a negative slope mean?
The line goes down from left to right.
How do I turn a slope into a roof pitch or grade?
Grade % = slope × 100; a slope of 0.5 is a 50% grade, or a 6/12 roof pitch.
Why is the slope undefined?
Both points have the same x, so the line is vertical.
故障排除
The midpoint shows a semicolon.
The semicolon separates coordinates so decimal commas in some languages are not confused; (1; 2) means x = 1, y = 2.
The angle is negative.
Negative angles are measured clockwise from the x-axis for descending lines.
I entered the same point twice.
Two distinct points are needed to define a line.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。