To calculate the pipe weight in kilograms, make sure to use kilograms per cubic meter for the density of your pipe material and multiply that by the volume of your pipe material in cubic meters. So, when using this formula:
Weight of Pipe (W) = (Outside Diameter - Wall Thickness) x Wall Thickness x Length x Density of Steel
Outside Diameter is the outer diameter of the pipe
Wall Thickness is the thickness of the pipe wall
Length is the length of the pipe
Density of Steel is the density of the steel used to make the pipe, which is typically around 7850 kg/m^3.
So, the weight of the pipe is calculated by finding the volume of the metal in the pipe (which is the difference between the volume of the outer cylinder and the inner cylinder), and then multiplying it by the density of the steel.
Note that this formula assumes that the pipe is made of steel. If the pipe is made of a different material, you will need to use the appropriate density value for that material.