how to calculate weight of carbon steel pipe?

how to calculate weight of carbon steel pipe?

To calculate the weight of a steel tube, use the following formula: weight = π × [(diameter/2)² - (diameter/2 - thickness)²] × length × steel density. The density of steel varies according to the type: 7.88 g/cm³ for mild steel, 7.84 g/cm³ for carbon steel or 8.03 g/cm³ for stainless steel.