Calculadora de Inclinação-Intercepto

Dada a reta pela forma y = mx + b, calcula a partir de dois pontos.
Created by
Renato Passos, Eng. de Software
Reviewed by
Renato Passos, Eng. de Software

Last updated: Apr 18, 2026

Inclinação (m)
2,000000
Intercepto (b)
1,000000

Formula

y = mx + b

About this calculator

The Slope-Intercept Calculator is an online tool that determines the equation of a line in the form y = mx + b from two given points. It calculates the slope (m) as the vertical change divided by the horizontal change and the y-intercept (b) as the value of y when x is zero. Ideal for geometry students and professionals needing quick linear modeling.

To use the calculator, enter the coordinates of two distinct points (x1, y1) and (x2, y2). The system automatically computes m and b, displaying the complete equation. The formula m = (y2 - y1) / (x2 - x1) is applied, and b is obtained by substituting one point into the equation. The tool also provides a graph of the line for easy visualization.

This calculator is useful in scenarios such as determining the rate of change in experiments, predicting values in simple linear regressions, or solving geometry problems. For example, when analyzing the relationship between time and distance in uniform motion, the slope represents speed. It also helps in constructing affine functions in financial mathematics.

Precautions: ensure the two points are not coincident, as this would result in an undefined slope. The calculator assumes the line is not vertical; for vertical lines (constant x), the slope is infinite and the equation cannot be represented in y = mx + b form. Check that coordinates are in the correct format (decimal numbers with a dot, not a comma).

Frequently asked questions

What does a negative slope mean?

A negative slope indicates the line decreases as x increases. For example, in a price-demand relationship, a negative slope shows price drops when demand rises.

Can I use points with decimal coordinates?

Yes, the calculator accepts decimal numbers. Use a dot as the decimal separator (e.g., 3.5). Do not use commas.

What happens if the two points are identical?

If the points are identical, the slope is undefined (division by zero). The calculator will display an error message. Use distinct points.

How do I get the y-intercept if the line is vertical?

Vertical lines (constant x) cannot be represented in y = mx + b form. For such cases, the equation is x = value. The calculator does not support vertical lines.

Does the calculator show the graph of the line?

Yes, after calculating m and b, the tool generates an interactive graph of the line on the Cartesian plane, making visualization easy.

Other Geometria calculators