It is similar to the round pipe.

The volume of the square pipe = cross-sectional area x Length

V= A x L = (a^{2}_{1 } – a^{2}_{2})x L

Where a_{1 }is outer edge width and a_{2} is inner edge width

Let us consider a 1m long square pipe of outer width 20 mm = 0.020 m and inner width 16 mm = 0.016 m

So, Volume of the square pipe = (0.0202^{2} – 0.0162^{2}) x 1 = 0.000144 m^{3}

Hence, mass of the square pipe = density x volume = 7900 x 0.000144 = 1.1376 kg

By using this formula we can calculate the mass of square pipe of different dimensions.

To calculate the weight of a square pipe, you need to know the dimensions of the pipe and its density. The formula for calculating the weight of a square pipe is as follows:

Weight = Density x Volume

where Density is the mass per unit volume of the material and Volume is the volume of the square pipe.

The formula for calculating the volume of a square pipe is:

Volume = Side length x Side length x Wall thickness

where Side length is the length of one side of the square pipe, and Wall thickness is the thickness of the pipe's walls.

The density of the material can vary depending on the specific material used. For example, the density of mild steel is around 7850 kg/m³ (or 0.2833 lb/in³).

Here is an example of how to calculate the weight of a square pipe:

Suppose you have a square pipe made of mild steel with the following dimensions:

Side length = 4 inches

Wall thickness = 0.25 inches

Length = 10 feet (or 120 inches)

First, calculate the volume of the pipe:

Volume = Side length x Side length x Wall thickness = 4 x 4 x 0.25 = 4 cubic inches

Next, convert the volume to cubic feet:

Volume = 4 / 1728 = 0.0023 cubic feet

Then, calculate the weight using the formula: Weight = Density x Volume = 0.2833 x 0.0023 x 12 x 12 x 120 = 19.8 pounds (approximately)

Therefore, the weight of the square pipe is approximately 19.8 pounds.