Master DataLast reviewed: 2026-07-31

Number Range

A number range is a rule stored in the ERP system that automatically assigns a unique, sequential number to documents and records such as invoices, orders or products.

A number range is a rule stored in the ERP system that automatically assigns a unique, usually sequential number to documents and records. Typical use cases are invoice, order, delivery note, quote, customer and product numbers. Instead of manually looking for a free number, the software accesses the appropriate number range when a document is created, determines the next value and assigns it – gapless, collision-free and traceable.

The number range defines not only the counting itself, but also the format: an optional prefix, the number of digits, the starting value and the increment. This turns a simple counter variable into a meaningful, consistent number such as “INV-2026-000148”. In regulated environments, the number range is also a compliance building block, because sequential and gapless document numbers are relevant to the proper keeping of accounts in Germany.

At a glance

  • Rule for automatically assigning unique, sequential document numbers
  • Components: prefix, starting value, increment, number of digits/format
  • Usually a separate range per document type (invoice, order, customer …)
  • In Germany, invoice numbers must be unique and traceable
  • Configured centrally in ERP, inventory management and financial accounting

What is a number range and what is it for?

A number range is a configurable numbering rule that ensures every document or record of a particular type receives exactly one unique identifier. It solves a fundamental problem of any business software: documents must be referenceable beyond doubt – for internal allocation, for the customer, for the tax advisor and for audits by the tax authorities.

Without automated number ranges, numbers would have to be assigned manually. This quickly leads to duplicates, gaps or transposed digits. The number range handles this task deterministically: it stores the value assigned last and returns the next one on every request. This makes the number a reliable key that keeps orders, delivery notes and invoices linked together throughout the entire process.

How a number range is structured

A number range consists of several parameters that together determine format and behaviour. In practice, these components are maintained in the ERP system as a template per document type.

Prefix, starting value and increment

The prefix is a fixed text placed before the counter number, such as “INV” for invoices or “OC” for order confirmations. It makes the number meaningful and allows document types to be distinguished at a glance. The starting value determines the number at which counting begins (often 1 or a higher “round value”). The increment determines how much the counter goes up each time – usually by 1.

Many systems additionally allow placeholders such as the fiscal year, so that numbers can be reset annually and prefixed with the year, for example “INV-2026-0001”. Important: a reset must not endanger uniqueness over time – the year in the prefix ensures that “INV-2025-0001” and “INV-2026-0001” remain different documents.

Number of digits and leading zeros

The number of digits defines how many digits the running number has. With leading zeros, 148 becomes “000148”, for example. This ensures uniform length, clean sorting and a professional document appearance. The number of digits should be chosen generously so that the range does not “overflow” over the years.

Number range in the ERP system

In the ERP system, the number range is not a minor topic but a central configuration point of the master data and the document logic. Almost every document type has its own range: quote, order, order confirmation, delivery note, invoice, credit note, but also master records such as customer, supplier and product numbers.

Separating by document type has a practical reason: it allows different formats and separate counts. This way the invoice number can run strictly gapless, while quotes are counted in their own, less critical range. In multi-client-capable systems, the number range is additionally maintained per client, so that the document numbers of different companies do not overlap.

Technically, the ERP must ensure that assignment remains collision-free even under concurrent access. When several employees or connected shops generate invoices at the same time, no number may be assigned twice – an aspect closely tied to clean data quality and transaction integrity.

Why a number range matters for compliance

In Germany, the VAT Act requires every invoice to bear a sequential number with one or more series of figures that is assigned once for identification purposes (Section 14 UStG). The number range is the tool with which an ERP implements this requirement technically: it guarantees uniqueness and traceability.

The question of gaplessness is often overemphasised: a mere gap does not automatically render an invoice invalid. What matters under the GoBD is that the assignment is documented traceably and tamper-proof, and that cancelled or skipped numbers remain explainable. That is why document numbers, once assigned, must not simply be deleted or overwritten – corrections are made via cancellation documents and credit notes that remain visible in the audit trail.

Distinction: number range, matchcode and barcode

The number range governs the assignment of the unique primary number. To be distinguished from it is the matchcode – an additional search and sort shorthand that does not have to be unique and serves quick findability. A barcode or a GTIN/EAN is not a number range either: these codes identify physical products in retail and follow external standards, whereas the number range is an internal, system-controlled assignment rule.

Likewise, the document number from the number range must not be confused with the technical database ID. The internal ID identifies the record within the system, but is invisible to users and carries no business meaning. The number from the number range, by contrast, is the externally visible, business-relevant identifier.

Configuring number ranges correctly

Setting up the number ranges is one of the first tasks in an ERP implementation and is often underestimated. Choosing the format too tightly risks an overflow; assigning inconsistent prefixes complicates later analysis and archiving. That is why format, prefix and number of digits should be defined cleanly and documented once before go-live.

A common mistake is the wish to “carry on with the old number” from an existing software. This is generally possible by setting the starting value of the new range to the next free number – provided the format is compatible. It becomes critical when number ranges are reset afterwards or documents are imported whose numbers collide with the running range. Such migration cases should always be tested and coordinated with the tax advisor.

Separate ranges per document type and client

As a rule of thumb: one dedicated number range per document type, in multi-client-capable systems additionally separated per client. This keeps invoices, credit notes and orders cleanly distinguishable, and the business-critical invoice numbering is decoupled from non-critical documents such as quotes. This separation improves clarity and reduces the risk of unintended collisions.

Example

Practical example: invoice numbers in e-commerce retail

An online retailer sells through its own shop and two marketplaces. All channels converge in one ERP that maintains its own number ranges per document type. For invoices, the range is configured with the prefix “INV-”, a year placeholder, six digits and an increment of 1. The first invoice of the year thus receives “INV-2026-000001”.

At the turn of the year the counter is automatically reset to 1; the year placeholder maintains uniqueness. When a faulty invoice is cancelled, its number remains in the system; the ERP creates a credit note in its own range and documents the process. During a tax audit, all invoice numbers can be traced gaplessly – manual assignment could neither be kept unique nor audit-proof at this document volume.

Frequently asked questions

They must be unique and sequential within the meaning of Section 14 UStG. A single gap – for example due to a cancellation or a year-end reset – does not invalidate the invoice, as long as the assignment is documented traceably. What matters is GoBD-compliant traceability, not a mathematically perfect series.
Yes, provided uniqueness is preserved. A year prefix such as “INV-2026-” is common; it secures the counter reset because the year is part of the number. Without such a prefix, a reset would lead to duplicate numbers and would be inadmissible.
The number range automatically assigns the unique primary number of a document or master record. The matchcode is an additional, not necessarily unique search and sort shorthand that only serves quick findability and carries no business meaning.
Format and prefix can be adjusted in most ERP systems, but the starting value should never be reset behind numbers already assigned, to avoid duplicates. Changes to the running invoice range should be documented and coordinated with the tax advisor.

Questions about Number Range in your ERP project?

We advise vendor-neutrally – and implement it ourselves on request.

Free consultation