Calculator
Try cet_units directly in this page. Enter a quantity or a calculation
(anything pint can parse) and, optionally, a
target unit and a GWP assessment context.
Loading Python runtime…
Examples:
How it works
The calculator above works locally in your browser via Pyodide — a WebAssembly build of CPython.
When the field for a target unit is left empty, the expression is evaluated and reduced to its default units, equivalent to:
from cet_units import ureg
ureg("2 MWh/t * 3 Mt").to_reduced_units()
When a target unit is given, .to(target) is used instead. When a GWP
context is also given (e.g. AR6GWP100), it is passed along as
.to(target, context), as required for converting between different
greenhouse-gas species.
The page address bar always reflects the current inputs, so it can be copied and shared directly; the "Copy Link" button does the same via the clipboard. Opening a shared link pre-fills the form and evaluates it automatically.