# Unit of measure codes (common)

UNECE Recommendation 20 codes for invoiced quantities (BT-130) and price base quantities (BT-150), such as piece, hour and kilogram.

## How these codes are used on invoices

UNECE Rec 20/21 defines the unit of measure codes that structured invoices use instead of free text. Receiving systems, ERPs and validators expect exact codes such as C62 (One), HUR (Hour), KGM (Kilogram). Units that appear most often on invoices. The allowed list combines Recommendation 20 and the X-prefixed package codes of Recommendation 21; PCE and PCS are not in it.

> **UNECE Rec 20/21**: Units that appear most often on invoices. The allowed list combines Recommendation 20 and the X-prefixed package codes of Recommendation 21; PCE and PCS are not in it.

## How to use this code list in production

Keep one mapping for unit of measure codes across ERP source data, generated XML and validation checks. Lock the allowed values before go-live, map legacy values before export, and make sure finance teams know which business cases require manual review.

## Unit of measure codes (common)

| Code | Meaning | Notes |
| --- | --- | --- |
| C62 | One | The most common code for counted items and flat-rate positions in XRechnung practice (“one”). Invoice Converter writes C62 for ERP units such as Stk, Stück, PCE, PCS, EA or PC. Keep BT-130 and BT-150 consistent. |
| H87 | Piece | Semantically the more specific code for counted items (“piece”). Use it when the recipient asks for H87. PCE and PCS are not valid unit codes and fail BR-CL-23, so map them to C62 or H87 before export. |
| EA | Each | A valid code (“each”), but less common than C62. Agree with the buyer which of C62, H87 or EA it expects, and use the same code on every line. |
| XPP | Piece (package type) | Recommendation 21 package code with the X prefix: one piece as a packaging unit (an unpacked single item). Use it only if the buyer bills by package type; ordinary item counts use C62 or H87. |
| HUR | Hour | Services billed by time. The hourly rate is the net price (BT-146) per HUR. |
| MIN | Minute | Short time units, for example telephone or support minutes. |
| SEC | Second | Usage-based billing in seconds, for example call or compute time. |
| DAY | Day | Day rates, for example equipment rental or consulting days. |
| WEE | Week | Weekly rates; state the covered period in the invoicing period (BG-14 or BG-26). |
| MON | Month | Monthly subscriptions and rent; state the service month in the invoicing period (BG-14 or BG-26). |
| ANN | Year | Annual licences and maintenance contracts; state the contract year in the invoicing period. |
| MMT | Millimetre | Length in millimetres, for example cut-to-size material. |
| CMT | Centimetre | Length in centimetres. |
| MTR | Metre | Length in metres, for example cables, pipes or fabric. |
| KMT | Kilometre | Distance-based charges, for example transport or travel kilometres. |
| MTK | Square metre | Area, for example flooring, cleaning or rented space. |
| MTQ | Cubic metre | Volume, for example concrete, water or gas. |
| GRM | Gram | Mass in grams, for example precious metals or laboratory material. |
| KGM | Kilogram | The most common mass unit on invoices. If the price is per 100 kg, set the price base quantity (BT-149) to 100. |
| TNE | Tonne (metric ton) | Metric tonne of 1,000 kg, for example bulk goods or waste. Not the US short ton (STN). |
| LTR | Litre | Volume in litres, for example fuel, oils or beverages. |

## Create an XRechnung from your PDF and confirm the unit codes

The converter writes C62 for Stk or Stück. If your buyer expects H87 (piece), change the unit before download. Already have an XML file? The free validator reports unit codes outside the allowed list under BR-CL-23.

- [Convert invoice](/en/pdf-to-xrechnung)
- [Validate XML](/en/xrechnung-validator)

Download requires an account. Subscriptions from €10/month with annual billing (excl. taxes), or €5 per conversion (excl. taxes) without a subscription.

## Practical tips before you send an e-invoice

- Use the exact code from UNECE Rec 20/21 and keep the spelling and casing expected by the standard.
- Check that the unit of measure codes you use match the business case and the related fields on the invoice.
- Validate the final XRechnung, ZUGFeRD/Factur-X, UBL, or CII file before sending it to the recipient.

## Common code-list mistakes

- Letting free-text values pass through the ERP export instead of mapping them to the official code list.
- Using a technically valid code without checking whether the recipient profile or country rule actually allows it.
- Fixing the XML output only, while leaving the upstream ERP source value inconsistent for the next invoice.

## Frequently asked questions

Common questions when teams choose unit of measure codes for an invoice or an ERP export.

### What are unit of measure codes used for on an invoice?
UNECE Rec 20/21 is the standardized list behind these codes. A code tells the receiving system exactly which value you mean, so the invoice can be processed automatically in XRechnung, ZUGFeRD/Factur-X, UBL, CII and Peppol workflows.

### Which unit of measure codes are used most often?
Common examples on this page include C62 (One), HUR (Hour), KGM (Kilogram). The right choice depends on your transaction, tax treatment, recipient requirements, and the invoice profile you are sending.

### Where do unit of measure codes go in a structured e-invoice?
Enter the code in the structured invoice field that matches its meaning, for example the currency field, VAT category field, payment means field, unit field, or invoice type field. The exact XML path depends on whether you send XRechnung, ZUGFeRD/Factur-X, UBL, or CII.

### How do I avoid validation errors with unit of measure codes?
Use only values allowed by the relevant implementation guide, keep the code exactly as defined in UNECE Rec 20/21, and provide all related data required by that choice. Many validation errors happen when a code is correct in isolation but inconsistent with the rest of the invoice.

### Can I use codes outside this page?
Often yes, but recipients and national profiles frequently accept only a practical subset of the full UNECE Rec 20/21 list. This page focuses on common invoice values, so confirm buyer-specific or country-specific rules before sending production documents.

## Download

Use this code list in your systems or validation rules.

- [Download JSON](/resources/code-lists/unit-codes/data?format=json)
- [Download CSV](/resources/code-lists/unit-codes/data?format=csv)

## Official resources

- [UNECE Recommendation 20/21 unit codes](https://unece.org/trade/uncefact)
- [XRechnung Validator](/xrechnung-validator)
- [Developer API](/developer-api)
