Amount in words
For the check, the note, the contract schedule — with the cents as a fraction over 100.
- Runs
- In this tab
- Data sent
- None
- Rounding
- Once, at the end
- Also in
- The Chrome extension
Amount in words, worked
Showing a worked example — type over it
Result
How the amount in words works.
Number to words for checks (US grammar, no "and" inside the number) or British cheques.
Quoted from the toolbelt spec, the document this tool was built against.
Where these numbers come from.
Negatives are parenthesised because that is what a statement does. The rest is four promises.
Minor units, never floats
Amounts are integers in the currency's smallest unit, end to end. A float never touches a cent.
Rounded once
Rounded once, at the end — never per operand, which is how a split stops summing to the whole.
Unit tested
The arithmetic lives in one unit-tested module, shared without reimplementation with the extension.
No network
There is no request to make. What you type stays in this tab and is gone when you close it.
More in data hygiene
The same number, elsewhere.
A calculator answers the question once. These carry the answer into a product, name what it computed, and argue the method.
- ComponentMoneyThe core primitive. A monetary value, formatted correctly.
- ComponentReceiptSheetPrintable/shareable receipt.
- ComponentCheckoutSummaryItemized total with fees and tax.
- TermPayeeThe party receiving a payment
- DocNumericsThe document that makes this a finance system rather than a dashboard kit. Everything here is a rule the rest of the library enforces on the consumer's behalf.
- DocCurrency decimal placesHow many decimals each ISO 4217 code is stored at — JPY 0, USD 2, KWD 3.