The formula for calculating the slope of a line is \\\\((y_2 - y_1) / (x_2 - x_1)\\\\), where \\\\((x_1, y_1)\\\\) and \\\\((x_2, y_2)\\\\) are two distinct points on the line.