units.money
currencies, live exchange rates, paid time like workday and workyr
Example results generated on 2026-10-08. Ones using
now,todayor randomness will differ when you run them: press Run on any example to run it in your browser, after editing it if you like.
types
# money
1234.5 USD
# → $1,234.50
pretty
# long and short: as money always shows
pretty(1234567 USD, "short")
# → "$1,234,567.00"
literals
# $ € £ before a number
$25/h
# → $25.00/h
# any currency code
1200 JPY
# → ¥1,200
paid time
# workday 8 h, workwk 40 h, workmo, workyr 2080 h; USD/yr stays calendar time
# hourly to salary
$25/h to USD/workyr
# → $52,000.00/workyr
# salary to hourly
85000 USD/workyr to USD/h
# → $40.87/h
currencies
# rates load (from cache, or online after allow_network_access()) only to convert between currencies: 20 USD to EUR
More examples
money
# yearly salary from hourly
$25/h to USD/workyr
# → $52,000.00/workyr
# what a meeting costs
6 * 95000 USD/workyr * 1 h
# → $274.04
# hours of work to buy it
$1200 / ($40/h) to workday
# → 3.75 workday
# unit price
$4.99 / 12 oz to USD/lb
# → $6.65/lb
# a subscription per year
$15.99/mo to USD/yr
# → $191.88/yr