Coordinate 1 ($P_1$)
Coordinate 2 ($P_2$)
X - Axis Y - Axis
Calculation Results

Mathematical Formulas

The calculation is based on standard analytic geometry principles for 2D Cartesian space.

  • Slope ($m$): $$ m = \frac{Rise}{Run} = \frac{y_2 - y_1}{x_2 - x_1} $$
  • Angle ($\theta$): $$ \theta = \tan^{-1}(m) $$
  • Distance ($d$): $$ d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} $$
  • Equation: $y = mx + b$

Key Concepts

Gradient vs. Slope: In mathematics, these terms are often interchangeable. In civil engineering, "Gradient" is often expressed as a percentage or ratio (e.g., 1:50) for roads and pipes, while "Slope" is the raw numerical value ($m$).

Rise & Run: "Rise" is the vertical change ($\Delta y$) and "Run" is the horizontal change ($\Delta x$) between two points.

How to Use

  1. Enter Coordinates: Input the X and Y values for Point 1 (Start) and Point 2 (End).
  2. Visual Verification: The graph updates in real-time. Ensure the visual representation matches your expectation.
  3. Calculate: Click "Calculate Result" to generate the slope, angle, and line equation.
  4. Export: Use the "Download PDF" feature to save a formal calculation report.