Cretia
← Back to blog

RFC homoclave: what it is and how to find yours

By Montserrat Devars

Published

Updated

Close-up of hands filling in a form with a fountain pen at a bright desk.

The homoclave is the last three characters of a Mexican tax ID (RFC, Registro Federal de Contribuyentes, the Federal Taxpayer Registry). Mexico's tax authority, the SAT, assigns it, and its job is to keep two people or companies with the same initials and the same date from ending up with the same ID. In the sample RFC the SAT itself uses, XEXT990101NI4, the homoclave is NI4.

An "RFC con homoclave" (RFC with homoclave) is simply the full RFC: 13 characters for an individual and 12 for a company. This guide explains what the homoclave is, where it sits, how an RFC is built position by position, how to find yours, and what to do when you invoice a customer in Mexico. It is general guidance, not tax advice.

What is the homoclave?

The SAT defines it in its document Estructura de la clave en el RFC (in Spanish) as a set of three characters assigned exclusively by the SAT in order to avoid duplicate RFCs. The same document calls them "three unique differentiating characters".

The problem it solves is easy to picture. The first positions of an RFC come from your name and your date of birth. Two people named Laura Gómez Ruiz who were born on the same day would share exactly the same first ten characters. The homoclave is what makes them two different taxpayers.

Three things worth knowing up front:

  • You do not choose it and you cannot change it. The SAT assigns it when you register.
  • It is not only digits. It can mix letters and numbers, as in NI4.
  • It is not a password or a secret. It is part of your tax ID and appears on your invoices, payslips and tax certificates.

Where the homoclave sits in an RFC

It always comes last. To find it, take the RFC and split off the final three characters:

  • Individual (persona física), 13 characters: XEXT990101NI4 reads as XEXT (name), 990101 (date of birth) and NI4 (homoclave).
  • Company or other legal entity (persona moral), 12 characters: EXT990101NI4 reads as EXT (company name), 990101 (date of incorporation) and NI4 (homoclave).

If the RFC you were given is 10 characters long (9 for a company), it is an "RFC sin homoclave" (RFC without homoclave): those three characters are exactly what is missing.

How an individual's RFC is built: 13 characters

Mexican names carry two surnames, the father's (apellido paterno) followed by the mother's (apellido materno), and the RFC uses both. According to the SAT document, the 13 positions are:

  • Position 1: the first letter of the paternal surname.
  • Position 2: the first vowel of the paternal surname after its initial letter.
  • Position 3: the first letter of the maternal surname.
  • Position 4: the first letter of the given name.
  • Positions 5 and 6: the last two digits of the year of birth.
  • Positions 7 and 8: the month of birth, two digits.
  • Positions 9 and 10: the day of birth, two digits.
  • Positions 11 to 13: the homoclave.

A single-digit month or day gets a leading zero. Take Laura Gómez Ruiz, born on 14 March 1992: G from Gómez, O as its next vowel, R from Ruiz and L from Laura give GORL. The date becomes 920314, in year-month-day order. Her RFC would be GORL920314 plus the three homoclave characters the SAT assigns.

Special cases, such as compound given names or people with a single surname, follow their own rules. That is why the definitive ID is always the one the SAT issues, not one worked out by hand.

How a company's RFC is built: 12 characters

A legal entity's RFC is one character shorter, because the name part takes three letters instead of four:

  • Positions 1 to 3: three letters taken from the registered company name (denominación or razón social). The SAT describes them as the first letters of the first three words of the name.
  • Positions 4 to 9: the date the entity was incorporated or created, as year, month and day with two digits each.
  • Positions 10 to 12: the homoclave.

The SAT notes that specific cases follow their own rules, always based on the registered name. A quick way to tell who you are dealing with: 13 characters is an individual, 12 is a company. That matters when you pick a tax regime for an invoice, because regimes are tied to the type of taxpayer.

Inside the homoclave: homonymy and the check digit

The homoclave itself has two parts. Technical specifications the SAT publishes for exchanging RFC data describe the format as letters, date, "HH = Homonimia" and "D = Dígito verificador". In other words:

  • The first two characters are the homonymy differentiator (clave diferenciadora de homonimia). Homonymy means sharing a name: these two characters tell apart taxpayers whose details produce the same letters and the same date.
  • The third is the check digit (dígito verificador), a control character used to catch typing mistakes in the ID.

In NI4, the homonymy part is NI and the check digit is 4. The pattern the SAT uses to validate an RFC on an invoice, published in the CFDI data types, confirms the shape: three or four letters (Ñ and the ampersand are allowed), six date digits, two characters that may be letters or numbers, and a final character that is a digit from 0 to 9 or the letter A.

RFC with homoclave vs. RFC without homoclave

The RFC with homoclave is the complete 12- or 13-character ID, and it is the only one that counts for tax purposes: the one that goes on an invoice, a payslip, a contract or a filing. Article 27 of Mexico's Federal Tax Code (Código Fiscal de la Federación, in Spanish) provides that the SAT assigns the ID to every taxpayer who registers and that it must be quoted on documents filed with the tax authorities.

The RFC without homoclave is just the letters and the date. Some forms accept it when a person is not registered yet, and those first ten positions normally match the first ten of the CURP, Mexico's population registry ID. But it does not identify a taxpayer, and an invoice cannot be stamped with it.

Do not fill in the missing characters with an online calculator. Those tools are not run by the SAT and may return something different from what is on record; the only valid homoclave is the one in the registry.

How to find your homoclave

If you are already registered, your homoclave already exists. You can look it up in these places:

  • On your tax status certificate (Constancia de Situación Fiscal) or your tax ID card (Cédula de Identificación Fiscal), both of which show the full RFC.
  • With the SAT service Consulta tu clave de RFC mediante CURP (in Spanish), for individuals. It needs no password: you enter your CURP and receive a message with the RFC linked to it.
  • On a payslip or an invoice issued to you, where your full RFC appears as the recipient.

If the SAT service finds no RFC for your CURP, you may not be registered yet.

How to get an RFC with homoclave

Getting an RFC with homoclave means registering with the SAT: the homoclave is created at registration. Article 27 of the Federal Tax Code requires individuals of legal age to apply for registration even if they have no business activity.

  • Individuals: the SAT says the process can be done online with a CURP, through a pre-registration, or in person at its offices.
  • Companies: registration is completed at a SAT office by appointment (the pre-registration can be started online), with the incorporation deed and the documents the SAT requires, or through the notary who incorporated the company.

To print it, generate your Constancia de Situación Fiscal on the SAT portal. The PDF includes the tax ID card with the full RFC and a QR code, and it is the document people mean when they ask for a printed RFC with homoclave.

Generic RFCs: when your customer has no Mexican tax ID

Two RFCs belong to no taxpayer and exist only for invoicing:

  • XAXX010101000: the general public (público en general), for sales to customers who do not ask for an invoice in their own name.
  • XEXX010101000: residents abroad who are not registered in the RFC.

Both end in 000. If you are a foreign company buying from a Mexican supplier and you are not registered with the SAT, the second one is the ID you should expect to see on your invoice.

Why the homoclave matters on an invoice

When a Mexican e-invoice (CFDI) is stamped, the authorized certification provider (PAC) checks that the recipient's RFC exists on the SAT list of registered, non-cancelled RFCs. A mistyped homoclave produces an RFC that does not exist or, worse, one that belongs to somebody else, and the stamp is rejected with error code CFDI40143.

Most typing mistakes land in the homoclave, because it is the only part that cannot be guessed from the name:

  • Mixing up the letter O and zero, or the letter I and one.
  • Leaving the RFC at 10 characters because the customer dictated it without the homoclave.
  • Adding hyphens or spaces. An RFC is written as one block, in capitals.

Once the RFC is right, the remaining recipient fields are the legal name, the postal code, the tax regime and the CFDI use code (uso de CFDI). After stamping, anyone can validate the invoice with the SAT.

The safest habit is to copy the RFC from your customer's certificate and store it once. In Cretia you save each customer's RFC, legal name, postal code and tax regime and reuse them when you issue from the invoicing module. Cretia is not a PAC: a certified PAC stamps the invoice.

FAQ

What is the homoclave?

It is the last three characters of a Mexican RFC tax ID. The SAT assigns it so that two taxpayers with the same initials and the same date do not share an ID. The first two characters tell namesakes apart and the third is a check digit.

What is an RFC in Mexico?

RFC stands for Registro Federal de Contribuyentes, the Federal Taxpayer Registry. In everyday use it means the tax ID the SAT assigns to each registered person or company: 13 characters for individuals and 12 for legal entities.

How do I find my homoclave?

Check your Constancia de Situación Fiscal or your tax ID card, or use the SAT service "Consulta tu clave de RFC mediante CURP", which needs no password. It also appears on payslips and on invoices issued to you.

Can I calculate my own homoclave?

No. The SAT assigns it at registration. Online calculators are not official and may return characters that differ from the ones on record, so always copy the RFC from an official document.

What RFC goes on an invoice for a foreign customer?

Mexican suppliers use the generic RFC XEXX010101000 for residents abroad who are not registered in the RFC. For sales to the general public the generic RFC is XAXX010101000.

Continue to Cretia’s Electronic invoicing module

Simplify your business with Cretia

Invoicing, CRM, accounting and more. All in one platform.

Start for free