CivilKit Calcs

Engineering calculations with real units

A spreadsheet stores a bare number and leaves the unit in a column heading. In a CivilKit Calcs sheet every quantity carries its unit: the engine multiplies and divides units, converts a result to the unit you ask for, and stops with a message when a formula adds a length to a time. This page shows how that works, with SI and US customary units, prefixes, percentages and units of your own.

Open this sheet in Calcs Open a blank sheet

Attaching and converting units

Write the unit after the number, with or without a space. An arrow converts the result to the unit you choose:

# Converting units

a: 1.23 m + 35 cm + 12 mm -> cm
v: 10 m/s -> km/h
P: 2.5 kN / (50 mm * 200 mm) -> MPa

The engine gives 159.2 cm, 36 km/h and 0.25 MPa. Without the arrow, a sum comes out in the first unit it meets. Any SI prefix works on any SI unit that takes one, so kN, MPa, mm and µm need no definition.

Video: Units and results (about 85 seconds). Read the chapter Units.

Try it

Open the sheet in Calcs or embed it.

US customary units

US customary units are built in and mix freely with SI ones:

# US customary units

F: 10 kip -> kN
p: 2000 psi -> MPa
H: 20 ft -> m

The results are 44.48 kN, 13.79 MPa and 6.1 m. A few bare names mean different things in the US and UK systems, such as gal and ton; a setting picks one, and an explicit suffix such as gal_US makes a sheet independent of it.

Errors that catch mistakes

Multiplying and dividing different units is normal: a uniform load in kN/m times a span squared gives a moment. In the beam bending sample, 12 kN/m on a 6 m span comes out as 54 kN·m, and the yield stress times the section modulus as a design capacity of 332.1 kN·m, both in kN·m because the units said so. Adding units that do not match is a mistake, and the engine stops at it. A sheet with len: x + t, where x is in metres and t in seconds, reports:

Inconsistent units: "m + s".

A unit slip is one of the most common errors in hand calculations. Here it stops the sheet and names the line.

Percentages and units of your own

A ratio has no unit and comes out as a plain number. An arrow to % shows it as a percentage without changing its value: a utilisation of 245.25 kN over 355.1 kN shows as 69.07 %.

A #unit line defines a unit of your own from units the engine knows:

# Units of your own

#unit bag = 25 kg | cement bag
#unit pallet = 40 bag
load: 3 pallet -> t
n: 1000 kg -> bag

Three pallets come out as 3 t and a tonne of cement as 40 bag. Currency can be defined the same way, as a dimensionless unit.

Where to find the units

There are about 400 built-in units: lengths, masses, forces, pressures, energy and power, temperatures, angles and electrical units among them. The Insert tab in the sidebar lists them by group, and the Math tab has a Units palette organised by dimension. The Units chapter of the guide has the full rules, including temperatures and angles.

Questions

Does it convert between SI and US units?

Yes. Write the unit after the number and ask for the result in any compatible unit with an arrow. For example 2000 psi comes out as 13.79 MPa.

What happens if the units do not match?

The line stops with an error that names the units it could not combine, such as "Inconsistent units". Multiplying and dividing different units is fine.

Can I define my own units?

Yes, with a #unit line: a name, an equals sign and its value in known units.

How are ratios shown?

As plain numbers. Add an arrow to % to show a ratio as a percentage; the value itself does not change.

Open this sheet in Calcs Open a blank sheet