Calculadora de pendentes
Achar a pendente, a intersección en y e a ecuación da liña que pasa por dous puntos.
Os resultados actualízanse mentres escribe.
Acerca desta calculadora
The slope of a line measures its steepness — the rise over the run between two points. This calculator takes two points and returns the slope, the y-intercept, the equation of the line in slope-intercept form, the angle of incline, and the distance between the points, with a plot of the line.
The slope is m = (y₂ − y₁) / (x₂ − x₁), the change in y divided by the change in x. From (0, 0) to (3, 6) that is 6 ÷ 3 = 2, so the line rises two units for every one across. The y-intercept b comes from b = y₁ − m·x₁ (here 0), giving the equation y = 2x, and the angle of incline is arctan(2) ≈ 63.4°. A positive slope rises left to right, a negative slope falls, and a slope of 0 is horizontal. A vertical line has no change in x, so its slope is undefined and its equation is x = constant.
Slope shows up as grade on a road, pitch on a roof, rate of change in a graph, and the coefficient in a linear equation. It is the single number that tells you how fast one quantity changes with another.
Preguntas frecuentes
Como se calcula a pendente a partir de dous puntos?
Inclinación = (y2 − y1) / (x2 − x1), a variación en y dividida pola variación en x. De (0, 0) a (3, 6) a inclinación é 6/ 3 = 2.
Por que non está definida a pendente dunha liña vertical?
Unha liña vertical non ten ningunha variación en x, polo que a fórmula de inclinación divídese por cero. A súa ecuación é x = constante no canto de y = mx + b.
Cal é a intersección en y?
É onde a liña cruza o eixo y, o b en y = mx + b, atopado de b = y₁ − m· x₁. Para a liña que pasa por (0, 0) e (3, 6) é 0.
Cal é o ángulo de inclinación?
É o ángulo que a liña fai coa horizontal, igual á arcotanxente da pendente. Unha pendente de 2 dá uns 63, 4°.
Que significa unha pendente positiva ou negativa?
Unha inclinación positiva sobe da esquerda para a dereita, unha inclinación negativa baixa, unha inclinación de 0 é horizontal e unha liña vertical ten unha inclinación indefinida.
A calculadora tamén mostra a distancia?
Si. Xunto coa inclinación dá a distancia en liña recta entre os dous puntos que introduciu.
API — empregar esta calculadora desde o código
Chama esta calculadora como un punto final JSON libre - non se require ningunha chave. Envie os valores dos campos de baixo como parámetros de consulta ou JSON. Anything you omit uses the same default this page is pre-filled with; an unknown parameter is a 400, never a silent zero. Ler a documentación completa da API →
Punto final
GET https://calculator.free/api/v1/slope/
curl
curl "https://calculator.free/api/v1/slope/?x1=0&y1=0&x2=3&y2=6"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/slope/?" + new URLSearchParams({
"x1": "0",
"y1": "0",
"x2": "3",
"y2": "6"
}));
const data = await r.json();
console.log(data.results);
Os resultados son estimacións só para orientación xeral, non para consellos financeiros, médicos ou fiscais.