Skip to main content
Check Digit Calculator
Banking

Swedish OCR Reference Calculator

Calculate Swedish OCR payment reference check digits using Luhn. Review the optional length-control digit and its placement.

Last updated:

Banking & Financial Standards

Calculate payment reference check digits.

Length: 10 chars
Calculated Check Character / Checksum
--Ready
Complete Validated Sequence:
--
Arithmetic Steps & Mathematical Specification

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.

  1. 1Enter the base reference digits.
  2. 2Choose whether the payee uses a length digit (variable or fixed length control).
  3. 3For length control, add the total length (including length and check digit) modulo 10.
  4. 4Compute the Luhn check digit over the result.
  5. 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)
  • L is the length digit.
Worked example: base 12345
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.

BaseLuhn checkOCR (no length)Length digitOCR (with length)
12345512345571234574
12345678903123456789032123456789023
20260014202600149202600193
10081008510058
55555555655555555605555555506

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.