Steel Weight Calculator (Bars, Pipes, Sections) API
Theoretical mass of rebar, round and square bars, pipes, box sections, plates with holes and I/H/U/L/T/C sections from dimensions, plus bar schedules.
Computes mass = cross-section area × length × density (7,850 kg/m³ for steel; stainless 7,930, aluminium 2,700, copper, brass, cast iron or any density). Shapes: rebar and round_bar (d), square_bar, hex_bar, flat_bar, pipe (outer diameter × wall), square_tube and rect_tube, plate (t × w × l with holes), angle (L / V), channel (U), i_beam (I / H), t_bar and cold-formed lipped_channel (C / Z purlins). The answer gives the area, kg per metre (or per m² for plates), kg per piece and total.
Send items for a bar schedule (bóc tách cốt thép): totals per diameter, total length, stock bars of 11.7 m (stock_length_m), bundles (bars_per_bundle), kilograms and tonnes.
Only your dimensions are used — no standard section tables are copied — so hot-rolled sections with root radii and tapered flanges, and tubes with rounded corners, differ from catalogue weights by a few percent (flagged as approximate).
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
shape | query | string | yes | rebar, round_bar, square_bar, hex_bar, flat_bar, pipe, square_tube, rect_tube, plate, angle, channel, i_beam, t_bar, lipped_channel. | |
d | query | number | no | Dimensions in mm by shape: d; a; s; w, t; od, t; a, b, t; t, w, l; h, b, tw, tf; h, b, c, t. | |
length_m | query | number | no | Piece length in m (default 11.7 for bars, 6 or 12 for sections). | |
quantity | query | number | no | 1 | Number of pieces. |
material | query | string | no | steel | steel, stainless, aluminium, copper, brass, cast_iron; or density kg/m³. |
items | body | array | no | Bar schedule: [{shape, d, length_m, quantity}, …]; with stock_length_m, bars_per_bundle. |
Example
curl "https://apibox.io.vn/v1/vn-steel-weight?shape=rebar&d=16&length_m=11.7&quantity=100" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/vn-steel-weight?shape=rebar&d=16&length_m=11.7&quantity=100', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/vn-steel-weight?shape=rebar&d=16&length_m=11.7&quantity=100",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-steel-weight?shape=rebar&d=16&length_m=11.7&quantity=100');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"shape": "rebar",
"shape_vi": "Thép thanh vằn (khối lượng danh nghĩa theo đường kính danh nghĩa)",
"dims_mm": {
"d": 16
},
"area_mm2": 201.06,
"kg_per_m": 1.5783,
"length_m": 11.7,
"quantity": 100,
"kg_per_piece": 18.467,
"total_kg": 1846.653,
"note": "Nominal mass π d²/4 × 7850 kg/m³ (e.g. d10 = 0,617 kg/m); actual mass within the tolerance of the product standard.",
"material": "steel",
"density_kg_m3": 7850,
"method": "mass = cross-section area × length × density (theoretical, from the dimensions you send; no standard section tables are used)"
}
Use cases
- Quote steel by weight in a hardware shop
- Total a rebar schedule by diameter for ordering
- Estimate the weight of a steel frame or plate with holes
- Add steel weights to a sales or ERP app
FAQ
How much does a 10 mm rebar weigh?
0.617 kg per metre (π × 10² / 4 mm² × 7,850 kg/m³), so a standard 11.7 m bar weighs about 7.21 kg.
Why does my I-beam weigh less than the catalogue?
The formula uses parallel flanges without the root radii of hot-rolled sections; catalogue masses are usually a few percent higher.
Can I compute stainless or aluminium?
Yes: material=stainless (7,930 kg/m³), aluminium (2,700) or any density in kg/m³.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.