If you need the weight of a square steel tube, the formula that comes to mind is the outer square minus the inner
square:

area = a² − (a − 2t)² # a = side, t = wall, both in mm kg/m = area × 0.00785 # 7850 kg/m³ × 1e-6 (mm² → m²) 

It is short, it is easy to test, and I had it in my own weight calculator for months. It is also wrong for real
tube, because it assumes the corners are sharp. Cold-formed square and rectangular hollow sections (SHS / RHS)
are bent from strip, and a bent corner has a radius. The steel that a sharp corner would have is simply not there.

I found the problem when the generic calculator on my site and the SHS table on the same site disagreed by 4 % for
50 × 50 × 3. The table used rounded corners; the calculator did not. So I measured how big the gap is over every
size in that table.

The rounded-corner area

EN 10219-2 (cold-formed structural hollow sections) gives the corner radii to use when calculating section
properties. The outside radius depends only on the wall thickness:

wall t outside radius ro inside radius ri
t ≤ 6 mm 2t ro − t
6 < t ≤ 10 mm 2.5t ro − t
t > 10 mm 3t ro − t

Each of the four corners is a quarter ring instead of a square block. Compared with the sharp corner, one corner
loses (1 − π/4)(ro² − ri²) of area, so all four lose (4 − π)(ro² − ri²):

from math import pi def radii(t): ro = 2 * t if t <= 6 else 2.5 * t if t <= 10 else 3 * t return ro, ro - t def sharp_area(H, B, t): return H * B - (H - 2 * t) * (B - 2 * t) def rounded_area(H, B, t): ro, ri = radii(t) return 2 * t * (B + H - 2 * t) - (4 - pi) * (ro * ro - ri * ri) def kg_per_m(area_mm2): return area_mm2 * 0.00785 

2t(B + H − 2t) is the sharp-corner area written differently (expand H·B − (H − 2t)(B − 2t) and you get the same
thing), so the only difference between the two functions is the corner term.

Two checks against published EN 10219 masses: 100 × 100 × 5 gives 14.410 kg/m (tables: 14.4), 40 × 40 × 2 gives
2.306 (tables: 2.31). The sharp-corner formula gives 14.915 and 2.386, both 3.5 % high.

The gap over 207 sizes

My SHS / RHS table lists 18 square sizes from 20 to 300 mm and 14 rectangular ones from 40 × 20 to 300 × 200, with
walls from 1.6 to 12.5 mm, keeping only the walls between about 1/50 and 1/8 of the smaller side. That is 207 rows.
For each one:

gap = sharp_area(H, B, t) / rounded_area(H, B, t) - 1 

The result, sharp-corner weight above the rounded-corner weight:

gap rows
0–1 % 3
1–2 % 48
2–4 % 71
4–6 % 40
6–8 % 21
over 8 % 24

The median is 3.5 %. The smallest gap is 0.9 % (200 × 100 × 2, a thin wall on a big section). The largest is
18.1 %, for 100 × 100 × 12.5. 62 of the 207 rows are more than 5 % off.

Some rows people actually order:

tube (mm) sharp corners kg/m EN 10219 corners kg/m gap
20 × 20 × 1.6 0.924 0.873 +5.9 %
50 × 50 × 3 4.427 4.245 +4.3 %
80 × 40 × 4 7.034 6.710 +4.8 %
100 × 100 × 5 14.915 14.410 +3.5 %
100 × 100 × 8 23.110 21.385 +8.1 %
100 × 100 × 10 28.260 25.565 +10.5 %
200 × 100 × 12.5 53.969 48.704 +10.8 %
300 × 300 × 6 55.390 54.662 +1.3 %

A 6 m length of 100 × 100 × 10 is 153.4 kg, not 169.6 kg. On a 2-tonne order (by sharp-corner weight) of that size,
about 191 kg of the steel you paid for on paper does not exist.

Why thick walls are worse

The lost area is proportional to t², because both radii scale with t:

ro² − ri² = t(2ro − t) = (2k − 1)·t² with ro = k·t loss = (4 − π)(2k − 1)·t² = 2.58 t² (k = 2), 3.43 t² (k = 2.5), 4.29 t² (k = 3) 

The sharp-corner area of a square tube is 4t(a − t), which grows with t only linearly. Dividing one by the other
gives the gap exactly:

gap = c·t / (4(a − t) − c·t) c = 2.58, 3.43 or 4.29 

For 100 × 100 × 10: 3.43 × 10 / (360 − 34.3) = 10.5 %. So the error is roughly proportional to t/a, and it gets a
step up each time the radius rule switches from 2t to 2.5t to 3t. That is why the worst row is the thickest wall on
a mid-size tube, and why 300 × 300 × 6 is barely affected.

A property test that fails: thicker wall, lighter tube

The obvious property test for a weight function is "more wall, more weight". With the EN 10219 radii it fails:

for t in (5.9, 6.0, 6.0001, 10.0, 10.0001): print(t, round(kg_per_m(rounded_area(100, 100, t)), 3)) # 5.9 16.729 # 6.0 16.982 # 6.0001 16.74 <- thicker wall, 0.24 kg/m lighter # 10.0 25.565 # 10.0001 24.891 <- 0.67 kg/m lighter 

At t = 6 the outside radius jumps from 12 mm to 15 mm, and the extra corner loss is bigger than the extra wall.
That is not a bug in the code; it is what a stepped rule does. It does not matter in practice, because tube is
rolled in standard walls (6, then 6.3 or 8; 10, then 12.5), and over the standard walls the weight does rise. So the
test I kept runs over the list of standard walls instead of arbitrary floats.

When the rounded formula breaks

The corner formula only makes sense while two outside radii fit across the side. For a 10 × 10 tube with a 3 mm
wall, ro = 6 mm, so 2ro = 12 mm is wider than the tube. The formula still returns a number (60.8 mm² against a
sharp-corner 84 mm²), but it describes no real shape. In the calculator I fall back to the sharp-corner area when
2 * ro > min(H, B). Sizes like that are not in any table; they show up only when someone types them.

Takeaways

  • a² − (a − 2t)² is a solid bar minus a solid bar. Real cold-formed tube is lighter by 0.9–18 % over common sizes, median 3.5 %.
  • Subtract (4 − π)(ro² − ri²) with the EN 10219-2 radii (2t / 2.5t / 3t) and you match published masses.
  • The error grows with t/a; thick walls on small tubes are the worst case.
  • Stepped rules in standards break "monotonic" property tests; test over the values the standard actually uses.
  • Guard the formula for impossible sizes instead of returning a confident wrong number.

The table I checked, with all 207 sizes, is the metric
square and rectangular tube weight chart.