Jarak antara Kalkulator Dua Titik
Cari jarak lurus antara dua titik pada pesawat.
Hasil update saat Anda mengetik.
Tentang kalkulator ini
This calculator finds the straight-line distance between two points (x₁, y₁) and (x₂, y₂) using the distance formula, and also reports the horizontal change (Δx), the vertical change (Δy), and the midpoint of the segment, with a plot of the two points.
The distance formula, d = √((x₂ − x₁)² + (y₂ − y₁)²), is simply the Pythagorean theorem applied to a grid: the horizontal and vertical gaps are the two legs of a right triangle and the distance is the hypotenuse. Between (0, 0) and (3, 4), Δx = 3 and Δy = 4, so d = √(3² + 4²) = √(9 + 16) = √25 = 5. Because the differences are squared, the order of the points does not change the result, and negative coordinates work fine.
This is the everyday tool for map distances, the length of a line segment, the magnitude of a vector, and nearest-neighbour comparisons in data. Any two points on a plane have exactly one straight-line distance between them.
Sering kali mengajukan pertanyaan
Apa rumus jarak?
It is d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (0,0) and (3,4) the distance is √(9 + 16) = √25 = 5.
Apa hubungannya dengan teorema Pythagoras?
Kesenjangan horizontal dan vertikal membentuk dua kaki dari segitiga kanan, dan jaraknya adalah hipotenusanya jadi rumus jarak adalah Pythagoras di grid.
Apa itu åx dan ○y?
They are the horizontal and vertical differences between the points, x₂ − x₁ and y₂ − y₁ — the two legs of the right triangle behind the distance.
Apakah alat ini menunjukkan titik tengah?
Ya, di samping jarak yang diberikan titik tengah, koordinatnya berada di tengah titik.
Apakah urutan poin penting?
Perbedaannya adalah kuadrat, jadi bertukar dua titik memberikan jarak yang sama.
Bisakah ia menangani koordinat negatif?
Ya, koordinat nyata, termasuk negatif dan desimal yang terjadi terus terjadi setiap jarak positif.
API — use this calculator from code
Sebut kalkulator ini sebagai titik akhir JSON Gratis tidak diperlukan kunci. Kirim nilai ruas di bawah sebagai parameter query atau JSON. Apa pun yang Anda abaikan menggunakan baku yang sama halaman ini sudah diisi dengan; sebuah parameter tidak diketahui adalah 400, tidak pernah nol diam. Baca dokumen API penuh →
Titik Akhir
GET https://calculator.free/api/v1/distance-two-points/
curl
curl "https://calculator.free/api/v1/distance-two-points/?x1=0&y1=0&x2=3&y2=4"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/distance-two-points/?" + new URLSearchParams({
"x1": "0",
"y1": "0",
"x2": "3",
"y2": "4"
}));
const data = await r.json();
console.log(data.results);
Hasil diperkirakan hanya untuk bimbingan umum, bukan keuangan, medis atau pajak.