Toolvito

Works on this device

Coordinate Geometry Calculator

Work with points and lines on a coordinate plane. Find a slope, a distance, a midpoint or the equation of a line, and see each step. Answers are exact fractions, with decimals next to them.

Enter your values

Gives the slope as an exact fraction, with the rise, the run, the angle and the equation of the line.

Your values

Type a whole number, a decimal or a fraction such as 3/4 or -1 1/2.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose what you want to find, for example Slope of a line through two points.
  2. Type the coordinates. You can use whole numbers, decimals, fractions such as 3/4 and mixed numbers such as -1 1/2.
  3. For an option that needs a line, type its equation, for example y = 2x + 1 or 3x - 4y = 8.
  4. Choose Calculate. The answer is shown as an exact fraction or a simplified square root, and as a decimal.
  5. Read How it was worked out to check each step. You can copy the result, print it or download it as a CSV file.

What each option does

  • Slope, distance and midpoint work from two points. Distance and midpoint also work in 3D.
  • Equation of a line can start from two points, from a point and a slope, from the slope and the y-intercept, or from the two intercepts. Each one gives slope-intercept, point-slope, standard and general form.
  • Slope, intercepts and forms from an equation reads an equation you type and rewrites it in every form. Use it to change standard form to slope-intercept form, or the other way.
  • Parallel and perpendicular lines through a point and Perpendicular bisector build new lines from a given one.
  • Two lines finds where they cross, the angle between them, and the distance between parallel lines. It also solves two equations with two unknowns, x and y.
  • Distance from a point to a line also gives the closest point and the reflection of the point in the line.
  • Missing coordinate, Missing endpoint and Point that divides a segment find a point from a slope, a midpoint or a ratio.
  • Slope from a table of points checks whether points are on one line. Area of a triangle or polygon uses the corners of the shape.
  • Equation of a circle, Cartesian and polar coordinates and Rotate a point cover the other common tasks.
  • Slope from rise and run and Convert a slope change a measured slope to a percent, an angle, a ratio or a roof pitch.

The formulas

  • Slope: m = (y₂ − y₁) ÷ (x₂ − x₁).
  • Distance: d = √((x₂ − x₁)² + (y₂ − y₁)²).
  • Midpoint: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).
  • Slope-intercept form: y = mx + b. Point-slope form: y − y₁ = m(x − x₁). Standard form: Ax + By = C.
  • Parallel lines have equal slopes. Perpendicular lines have slopes that multiply to −1.
  • Distance from a point to a line: |a × x₀ + b × y₀ + c| ÷ √(a² + b²), for the line ax + by + c = 0.
  • Section formula: ((m × x₂ + n × x₁) ÷ (m + n), (m × y₂ + n × y₁) ÷ (m + n)).
  • Shoelace formula for area: |Σ (xᵢ × yᵢ₊₁ − xᵢ₊₁ × yᵢ)| ÷ 2, with the corners in order.
  • Circle: (x − h)² + (y − k)² = r², with centre (h, k) and radius r.
  • Polar coordinates: r = √(x² + y²) and θ = atan2(y, x). Back again: x = r × cos θ and y = r × sin θ.

Worked examples

Slope. For the points (1, 2) and (4, 6), the rise is 6 − 2 = 4 and the run is 4 − 1 = 3. The slope is 4/3, which is 1.33333 as a decimal. The line is y = (4/3)x + 2/3.

Distance and midpoint. For the same points, the distance is √(3² + 4²) = √25 = 5. The midpoint is ((1 + 4) ÷ 2, (2 + 6) ÷ 2) = (5/2, 4).

Line from a point and a slope. Through (2, 3) with slope 3/4: point-slope form is y − 3 = (3/4)(x − 2). Slope-intercept form is y = (3/4)x + 3/2. Standard form is 3x − 4y = −6.

From an equation. 2x + 3y = 12 has slope −2/3. It crosses the y-axis at (0, 4) and the x-axis at (6, 0). In slope-intercept form it is y = −(2/3)x + 4.

Two lines. y = 2x + 1 and x + y = 7 cross at (2, 5). The angle between them is 71.5651°.

Point to a line. The distance from (2, 3) to 2x + 3y = 12 is |2 × 2 + 3 × 3 − 12| ÷ √13 = 1 ÷ √13 = √13 / 13, which is about 0.27735.

Area. The triangle with corners (0, 0), (4, 0) and (4, 3) has area |12| ÷ 2 = 6 square units.

Typing numbers and equations

  • A fraction is typed with a slash: 3/4. A mixed number has a space: 1 3/4. A decimal uses a point: 0.75.
  • An equation uses the letters x and y only. You can use brackets, for example y - 3 = 2(x - 1).
  • A fraction in front of a letter, such as 3/4x, means (3/4) × x.
  • An equation with no = sign and no y, such as 2x + 3, is read as y = 2x + 3.
  • A list of points has one point on each line, such as 1, 3. You can also type them in brackets: (1, 3) (2, 5).

Limits you should know

  • This tool does not draw graphs. It gives a table of points that you can plot to draw a line.
  • It works with straight lines, circles and points. It does not work with curves such as parabolas, or find the slope of a curve at a point.
  • Distances are on a flat grid. It does not find the distance between places, addresses or latitude and longitude points on the Earth.
  • In 3D it finds only a distance and a midpoint. It does not work with planes or lines in space.
  • It converts single points between Cartesian and polar form, not whole equations.
  • Points must fit one line exactly to count as being on one line. It does not find a line of best fit.
  • Polygon corners must be listed in order around the shape, and the sides must not cross.
  • Square roots are simplified for numbers of normal size. A root of a very large number may be left partly simplified.
  • The slope options are plain geometry. They do not check building, plumbing, road or access rules.

Related tools