Calculate payment reference check digits.
Initialising algorithm engine for Swedish OCR Reference Calculator...
How Swedish OCR Reference Calculator Works?
The Swedish OCR Reference Calculator applies Luhn, or modulus 10, to the reference digits. If the scheme also checks length, a length digit goes before the check digit.
- 1Enter the base reference digits.
- 2Choose whether the payee uses a length digit (variable or fixed length control).
- 3For length control, add the total length (including length and check digit) modulo 10.
- 4Compute the Luhn check digit over the result.
- 5Append the check digit to complete the OCR number.
Swedish OCR Reference Calculator Formula
The Swedish OCR formula is Check = Luhn(base) or Luhn(base + length digit).
Without length: OCR = base ‖ Luhn(base)
With length: L = (len(base) + 2) mod 10
OCR = base ‖ L ‖ Luhn(base ‖ L)Lis the length digit.
Without length digit: 123455 Length digit = (5 + 2) mod 10 = 7 With length digit: 1234574
Swedish OCR Reference Calculator Conversion Table
The Swedish OCR conversion table lists bases with and without a length digit.
| Base | Luhn check | OCR (no length) | Length digit | OCR (with length) |
|---|---|---|---|---|
| 12345 | 5 | 123455 | 7 | 1234574 |
| 1234567890 | 3 | 12345678903 | 2 | 123456789023 |
| 2026001 | 4 | 20260014 | 9 | 202600193 |
| 100 | 8 | 1008 | 5 | 10058 |
| 55555555 | 6 | 555555556 | 0 | 5555555506 |
What is Swedish OCR Reference Calculator?
A Swedish OCR Reference Calculator is a tool that computes the check digit of an OCR number (OCR-referens) used on Swedish Bankgiro and Plusgiro payments.
Bankgirot offers 3 levels of OCR control: check digit only, check digit with variable length, and check digit with fixed length.
What are the uses of Swedish OCR Reference Calculator?
There are 3 main uses of the Swedish OCR Reference Calculator, including Bankgiro invoices, Autogiro files, and payment matching.
- Bankgiro invoices: Swedish companies print OCR numbers on invoices.
- Autogiro files: Billers include OCR numbers in direct debit files.
- Payment matching: Accounting systems match incoming payments by OCR number.