Hverdag · verktøy

Kalkulator for koordinatgeometri

Skriv inn x- og y-koordinatene for begge punktene. Loddrette linjer vises uten et udefinert stigningstall.

Kjøres i nettleseren. Ingen opplasting.

Values are processed locally in this browser.

Result

—

Om verktøyet

Kalkulator for koordinatgeometri sem complicação.

Avstanden beregnes med den euklidske formelen. Resultatene bruker koordinatene akkurat slik de er skrevet inn, og avrundes bare hvis visningen krever det.

Veiledning

Slik bruker du Kalkulator for koordinatgeometri

The Coordinate Geometry Calculator takes two points on a flat grid, each with an x and a y value, and shows the slope between them, the straight-line distance, the midpoint and the equation of the line through them. It works in two dimensions only. It does not graph the points and it does not handle three-dimensional space.

Slik gjør du

  1. Type x and y for Point 1 and x and y for Point 2. Negative numbers and decimals are allowed. Leave none of the four boxes empty.
  2. Press Calculate. The result shows four lines: Slope, Distance, Midpoint and, when the line is not vertical, a Line equation.
  3. Press Copy result to copy the text, or Clear to start again.
  4. Check the line equation yourself by putting one of your points into it. The slope, distance and midpoint are simple formulas, but the sign of the constant in the equation deserves a second look.

Eksempler

A 3-4-5 triangle

Du skriver inn
Punkt 1 x
0
Punkt 1 y
0
Punkt 2 x
3
Punkt 2 y
4
Du får
Resultat
Slope: 1.333333 Distance: 5 Midpoint: (1.5, 2) Line: y = 1.333333x + 0

The run is 3 and the rise is 4, so the slope is 4 divided by 3. The distance is the square root of 3 squared plus 4 squared, which is 5. The midpoint is the average of each coordinate.

Kjørt med verktøyets egen kode.

A vertical line

Du skriver inn
Punkt 1 x
3
Punkt 1 y
3
Punkt 2 x
3
Punkt 2 y
9
Du får
Resultat
Slope: undefined (vertical line) Distance: 6 Midpoint: (3, 6)

Both points have x equal to 3, so the run is zero and the slope cannot be divided out. The tool says undefined and leaves out the Line row. The distance is just the difference in y.

Kjørt med verktøyets egen kode.

A line that falls

Du skriver inn
Punkt 1 x
0
Punkt 1 y
1
Punkt 2 x
2
Punkt 2 y
0
Du får
Resultat
Slope: -0.5 Distance: 2.236068 Midpoint: (1, 0.5) Line: y = -0.5x + 1

Over a run of 2 the line drops by 1, so the slope is minus one half. The distance is the square root of 5, about 2.236068. The line crosses the y axis at 1, which matches the point (0, 1).

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Check homework on slope, distance and midpoint.
  • Find the centre point between two places on a map grid or a plan.
  • Get the slope of a ramp or a trend between two measured points.
  • Find the length of a diagonal between two corners on a drawing.

Begrensninger

  • Only two points in a plane. Three-dimensional points, several points or curves are not supported.
  • Results are rounded to at most six decimal places, and very large coordinates may show rounding in the last digits.
  • If both points are the same, the tool reports a vertical line with distance 0. In that case no single line exists through them.
  • The line equation is printed as y = mx + b with the numbers it computes, so a slope of 1 appears as 1x. Check the sign of the constant by substituting a point.
  • It does not draw a graph and does not give the line in other forms, such as standard form or point-slope form.

Tips

  • For a quick check of the line, put x1 into the equation. The y you get must equal y1.
  • Swap the two points. The slope, distance and midpoint stay the same, and that confirms you typed them consistently.
  • Keep the same unit for x and y if the distance matters, or the distance has no clear meaning.

Kilder

Vanlige spørsmål

Sobre Kalkulator for koordinatgeometri.

How is the slope worked out?

It is the change in y divided by the change in x, that is (y2 minus y1) over (x2 minus x1). A positive slope rises from left to right and a negative slope falls. A slope of zero means a flat horizontal line.

What formula gives the distance?

The distance is the square root of the sum of the squared x difference and the squared y difference. This is the Pythagorean theorem applied to the right triangle formed by the two points. It gives the straight-line length between them.

How is the midpoint found?

Add the two x values and divide by two, then add the two y values and divide by two. The pair you get is the point exactly halfway along the straight segment between the two points you entered.

Why is the slope undefined for a vertical line?

On a vertical line both points share the same x, so the change in x is zero and you cannot divide by it. The tool then prints a message instead of a number and does not print a line equation.

Can I enter decimals or negative numbers?

Yes. The boxes accept any real number, including negatives and decimals. A box that is empty or not a number gives an error asking for a valid coordinate, and it counts the coordinates in the order x1, y1, x2, y2.

Why should I check the line equation?

The line is built from the slope and one of your points, and the sign shown before the constant has not always matched the true intercept in our tests. Substitute a point you know. If the y value does not match, rebuild it by hand.

Are my numbers sent anywhere?

No. The calculation runs in your browser and the numbers are not uploaded. The page says values are processed locally. The result is only text on the page until you press Copy result.

Hvordan bruker du Koordinatgeometri?

Skriv inn x- og y-koordinatene for begge punktene. Loddrette linjer vises uten et udefinert stigningstall.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.