ForHosting KIT · Developer Utilities

ABA routing check digit

Find or verify the ninth digit of a US bank routing number with the official 3-7-1 weights, so 02100002 gets check digit 1 and becomes 021000021. A single mistyped digit is caught before a payroll or vendor file goes out. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Number
02100002
You get
Calculation mode
Compute
Input
02100002
Check digit
1
With check
021000021

compute from 8 digits or validate a 9-digit RTN

What the nine digits of a routing number mean

A US routing transit number, also called an ABA routing number, is always nine digits long. The first eight form the institutional part: they identify the Federal Reserve district, the bank and its check-digit series. The ninth is the check digit, and its only job is to prove that the whole number was typed or pasted without a single-digit slip. A routing number that fails the check should be corrected at its source, not trimmed or padded until it passes. The rule is specific to routing numbers: UPC, EAN and Luhn use other weights and other lengths.

Working out the check digit step by step

Take the eight digits from left to right and multiply them by the repeating weights three, seven and one: three, seven, one, three, seven, one, three, seven. Add the eight products. The check digit is ten minus the remainder of that sum divided by ten, and a result of ten becomes zero. For 02100002 the check digit is 1, so the full routing number is 021000021. To validate a complete number, give the ninth digit a weight of one as well: the weighted sum of all nine must be divisible by ten. Payroll and vendor teams use this to flag rows in an export before a payment run.

How the ABA routing check digit is calculated

An ABA routing transit number is always nine digits. The first eight form the institutional body (Federal Reserve district, bank identifier, and related series); the ninth is the check digit. Add those eight products, then take the check digit as ten minus that sum modulo ten, modulo ten again so a remainder of zero yields check digit zero.

Equivalently, the full nine-digit string including the check digit must have a weighted sum divisible by ten when the ninth position also uses weight one (continuing the three-seven-one cycle). This is not the same rule as UPC, EAN, or Luhn: those use other weight patterns and different lengths.

Audit routing columns in payroll and vendor exports

Batch-validate every nine-digit ABA RTN in a CSV and quarantine rows whose check digit no longer matches the recomputed expected value before ACH submission.

What is an ABA routing number check digit?

It is the ninth digit of a US bank routing transit number (RTN), computed with the 3-7-1 weighted mod-10 rule so single-digit typing and paste errors are usually caught before the number is stored or sent in ACH.

Is the ABA routing check digit tool free?

The browser tool is free and runs locally.

How is the ABA routing check digit calculated?

Multiply the eight digits, from left to right, by the repeating weights three, seven, one, three, seven, one, three, seven and add the products. The check digit is ten minus the remainder of that sum divided by ten, and a result of ten becomes zero.

Why must I keep the leading zero of a routing number?

Because that zero is one of the nine digits. Enter digits only, exactly as printed: 021000021 has nine digits, but dropping its first zero leaves eight, and the check rejects the number as the wrong length.

Can I check a routing number with a Luhn or UPC validator?

No. Luhn, UPC and EAN use other weight patterns and other lengths, so their verdict says nothing about a routing number. Routing numbers need the 3-7-1 cycle over exactly nine digits.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/aba-routing

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/aba-routing \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"02100002"}'
{
  "number": "02100002"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.aba_routing",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

US bank routing transit numbers (RTNs), also called ABA routing numbers, are nine digits long: eight payload digits that identify the Federal Reserve district, institution, and check-digit series, plus one trailing check digit that proves the whole string was typed or pasted without a single-digit slip. This capability implements the official three-seven-one weighting used by the American Bankers Association and Federal Reserve: positions cycle through weights three, seven, and one, and the full nine-digit sum must be divisible by ten. Non-numeric input and wrong lengths fail with invalid_input instead of silent stripping, so you never store a half-cleaned RTN. The same pure arithmetic runs free in the browser and at the published API price.

How the ABA routing check digit is calculated

To compute it, walk the eight payload digits from left to right and multiply by the repeating weight sequence three, seven, one, three, seven, one, three, seven. Compared with multi-format payment-number validators, the search intent here is narrow: people who need an ABA routing check digit calculator for eight-digit payloads or nine-digit RTNs, not a general IBAN or card-number checker.

Input contract, modes, and error behaviour

Send a number field that contains only characters zero through nine. Wrong length is an explicit error that names the mode and the length you sent—eight for compute, nine for validate—so client forms can show “need eight digits” without guessing. Empty strings, missing number, and invalid mode values fail before any weighted sum runs and are not billed. Prefer compute when you mint test RTNs or complete partial institutional identifiers; prefer validate when you gate ACH setup or import on a full nine-digit code from a user or partner file. Spaces, hyphens, letters, and decimal points are rejected as non-numeric input with invalid_input so a silently stripped value never reaches storage. Mode compute is the default: the engine requires exactly eight digits, returns check_digit as a one-character string, and returns with_check as the nine-digit routing number you can print or persist. Mode validate requires exactly nine digits; the response reports valid true when the trailing digit matches the recomputed expected_check_digit, and always includes payload (the first eight digits), check_digit, expected_check_digit, length nine, algorithm aba-3-7-1, and weights 3-7-1. Alias keys such as digits, routing, rtn, and code are accepted for the same payload field so integrations that already speak “routing” do not need a rename. Because the path is pure parse with no clock, random source, or network, the same JSON body always yields the same JSON result on the free browser tool and on the API at $0.002 per successful request.

Where ABA routing check digits fit real workflows

Payroll and benefits platforms receive bank routing numbers from employees and must reject mistyped ninth digits before the first direct-deposit file is submitted to the ODFI. Treasury and AP teams validate every routing column in a vendor CSV export, quarantine rows where valid is false, and avoid failed ACH batches that cost delay and rework fees. Sandbox and demo environments often need synthetic but checksum-valid routing numbers; compute mode turns any eight-digit body into a nine-digit string that passes local format gates without inventing a real bank relationship. Fintech onboarding forms recompute expected_check_digit and show a friendly correction when a customer pastes a nine-digit RTN with a single transposition. Do not treat a passing ABA check as proof of an open account, OFAC clearance, or current Federal Reserve assignment; it only proves the three-seven-one digit is consistent with the payload under the standard weights.

Complete an 8-digit body for a nine-digit RTN

Call compute mode with the eight-digit payload, store with_check, and feed the nine-digit ABA routing number into ACH forms, test fixtures, or label templates.

Validate typed or pasted routing numbers at entry

When a form or partner file submits nine digits, call validate mode and block save when valid is false, showing expected_check_digit to help correct a single mistype.

How do I compute an ABA routing check digit with this API?

POST with number set to exactly eight digits and mode compute (or omit mode). The response includes check_digit and with_check (the full nine-digit routing number).

How do I validate a full nine-digit ABA routing number?

POST with the nine-digit string and mode validate. The response includes valid, check_digit, expected_check_digit, and payload (digits without the last one).

What happens with wrong length, letters, or hyphens?

Non-numeric input and lengths other than eight (compute) or nine (validate) are rejected with invalid_input. Failed validation tasks are not billed.

Read the full KIT documentation →