What is a GL code?
A GL code is the account number from your chart of accounts, often combined with segments or dimensions such as department, class, location or project.
The account says what the cost is: rent, software, freight. The dimensions say who or where: the sales team, the Chicago office, Project 214. Together they decide where the cost shows up in the general ledger and in every report built on it.
There is no single numbering standard. Most charts of accounts group accounts into the same five types (assets, liabilities, equity, income and expenses), and the number ranges vary by software and by company. A common pattern looks like this:
| Range | Account type | Example accounts |
|---|---|---|
| 1000–1999 | Assets | 1400 Prepaid expenses, 1500 Equipment |
| 2000–2999 | Liabilities | 2000 Accounts payable, 2100 Accrued expenses |
| 3000–3999 | Equity | 3000 Owner’s equity, 3200 Retained earnings |
| 4000–4999 | Income | 4000 Sales, 4100 Service revenue |
| 5000–5999 | Cost of goods sold | 5000 Materials, 5100 Freight in |
| 6000–7999 | Operating expenses | 6100 Software subscriptions, 6200 Rent, 6300 Utilities, 6400 Office supplies, 6500 Contractors |
A fully coded line then reads like 6100 · Sales · New York: account 6100, department Sales, location New York. Some systems store this as one segmented string (for example 6100-20-03); others keep the account and each dimension in separate fields.
How to code an invoice, step by step
Validate the invoice, inherit coding from the PO if there is one, otherwise start from the vendor default, then choose the account and dimensions line by line and send it for approval.
- 1
Step 1
Check the invoice is valid: right vendor, your company as the customer, an invoice number, a date and a total that adds up. - 2
Step 2
If it references a purchase order, pull the PO and use the account and dimensions already on each PO line. - 3
Step 3
For a non-PO invoice, start from the vendor’s default coding, then read each line and confirm it fits what was actually bought. - 4
Step 4
Pick the GL account for each line from your chart of accounts. Ask: is this an expense for this period, an asset, or a prepayment for future periods? - 5
Step 5
Add the dimensions your company tracks, such as department, class, location or project. Split a line across them when the cost is shared. - 6
Step 6
Treat tax and freight consistently with your policy, either on the same account as the item or on their own lines. - 7
Step 7
Send the coded invoice to the budget owner for approval, so the person who knows the spend confirms the coding.
Coding PO invoices vs non-PO invoices
A PO invoice should inherit its coding from the purchase order lines; a non-PO invoice needs coding from scratch, which is where most errors happen.
- PO invoices. The requester and approver chose the account and department when they raised the purchase order. When the invoice is matched to the PO, each invoice line takes the coding of the PO line it matches. AP should only change it if what was billed differs from what was ordered. See three-way matching.
- Non-PO invoices. Utilities, rent, subscriptions and one-off services rarely have a PO. Use the vendor's default coding as a starting point, check each line against it, and have the budget owner confirm it during approval.
- Mixed invoices. When a vendor bills ordered goods and an unplanned extra on one invoice, code the matched lines from the PO and code the extra line on its own, so it is visible to the approver.
GL code examples: common invoice lines and where they go
Most invoice lines fall into a handful of patterns; the main judgment calls are whether something is an asset, a prepayment or an expense for this period.
| Invoice line | Typical account type | Notes |
|---|---|---|
| Monthly software subscription | Operating expense (software) | Split by department if several teams use it. |
| Annual software or service contract paid up front | Prepaid expenses (asset) | Move one month’s share to expense each month of the term. |
| Office rent | Operating expense (rent) | Code to the location the space serves. |
| Electricity, water, internet | Operating expense (utilities) | Code to the location on the bill. |
| Freight on goods for resale | Cost of goods sold (freight in) or inventory | Follow your inventory costing policy. |
| Freight on equipment you will capitalize | Part of the asset’s cost | Shipping and installation usually go on the asset, not to expense. |
| Office supplies | Operating expense (office supplies) | Low value and used up quickly, so expensed. |
| Equipment above your capitalization threshold | Fixed asset (equipment) | Depreciated over its useful life rather than expensed at once. |
| Equipment below your capitalization threshold | Operating expense (small equipment) | Apply the same threshold every time. |
| Contractor or consulting services | Operating expense (contractors or professional fees) | Code to the department or project that used the service. |
Split coding across departments
When one invoice line serves several teams or locations, split it into parts with the same account and different dimensions, using a basis you can explain such as headcount, seats or square footage.
| Account | Department | Seats | Amount |
|---|---|---|---|
| 6100 Software subscriptions | Sales | 12 | $900 |
| 6100 Software subscriptions | Operations | 9 | $675 |
| 6100 Software subscriptions | Finance | 3 | $225 |
| Total | 24 | $1,800 |
Write the split basis down and reuse it every month. If the basis changes (a team grows, an office moves), update the vendor's default split rather than reworking each invoice by hand.
Sales tax and VAT on invoices
In the US, sales tax a vendor charges is usually part of what you paid for the item; in VAT countries, VAT you can reclaim is usually recorded separately from the cost.
- US sales tax. Code the tax to the same account as the item it relates to, or to a separate tax expense account if that is your policy. For equipment you capitalize, the IRS treats sales tax, freight and installation as part of the asset's cost.
- Untaxed purchases. If a vendor did not charge sales tax on something taxable where you use it, you may owe use tax. Rules vary by state, so check with your tax adviser.
- VAT and GST. A registered business usually records reclaimable input tax in a tax account, not in the expense. VAT you cannot reclaim becomes part of the cost.
- Be consistent. Whatever your policy, apply it on every invoice. Mixed treatment makes expense accounts hard to compare month to month.
How dimensions work in QuickBooks Online and Xero
QuickBooks Online uses classes and locations as dimensions; Xero uses tracking categories. Both let you report by department or site without adding more GL accounts.
- QuickBooks Online classes. Available on the Plus and Advanced plans. You turn on class tracking under Account and settings, then choose whether a class applies to the whole transaction or to each row. You can also ask QuickBooks to warn you when a transaction has no class. Intuit describes classes as a way to track parts of the business such as departments or product lines.
- QuickBooks Online locations. Also on Plus and Advanced. Locations group data for offices, regions, outlets or departments of the same company. See our guide to QuickBooks Online class tracking for multiple locations.
- Xero tracking categories. Xero's tracking categories let you assign expenses to projects, departments or cost centers, so you can see spending by part of the business without creating a separate account for each one.
The rule of thumb in both: use accounts for what you spent on and dimensions for who or where. A chart of accounts with "Software – Sales" and "Software – Finance" as separate accounts is a sign that a dimension would do the job better.
Common coding errors and what they cost
Miscoding rarely changes the total you owe, but it misstates where the money went, which skews the P&L, budgets and the balance sheet until someone finds and corrects it.
| Error | What goes wrong |
|---|---|
| Expensing an asset (or capitalizing an expense) | Profit is understated this period and overstated later, or the reverse. Assets on the balance sheet are wrong. |
| Expensing an annual prepayment in one month | One month looks expensive, the next eleven look cheap. Trend reports and margins are distorted. |
| Wrong department or location | Budget owners see variances that are not theirs, and real overspend is hidden in another team’s numbers. |
| Catch-all accounts (“Miscellaneous”, “Other expense”) | Costs cannot be analyzed, and someone has to reclassify them at close or year-end. |
| Inconsistent coding of the same vendor | Month-to-month comparisons break, and spend by category is unreliable. |
| Errors found late | Reclassification journal entries at close, and audit adjustments if they survive to year-end. |
Controls that keep coding accurate
Set defaults so most invoices are coded the same way every time, have the budget owner confirm coding at approval, and review coding before each close.
- Vendor default coding. Give each recurring vendor a default account and dimensions. It removes guesswork for the bulk of invoices.
- Approver review. The approver confirms both the spend and the coding. Routing invoices by GL account or department sends each one to the person who can judge it. See invoice approval routing.
- Written capitalization policy. A dollar threshold and a list of asset classes, applied the same way every time.
- Lock down the chart of accounts. Limit who can add accounts, and retire unused ones, so coders cannot pick from a long list of near-duplicates.
- Periodic coding review. Before each month-end close, scan expense accounts for unusual amounts, catch-all balances and lines without a department.
Automating invoice coding
Invoice coding software applies vendor defaults and suggests an account for each line from the description and past coding, then checks it against your chart of accounts; a person still reviews before approval.
Automation helps most with non-PO invoices from recurring vendors, where the same coding decision is made again every month. Look for three things: rules you control (vendor and line defaults), suggestions limited to accounts that actually exist in your chart of accounts, and a clear review step where a person can accept or change the coding. Avoid any tool that posts coding to your ledger without someone seeing it.
How Aequo AP helps with GL coding
Aequo AP applies your vendor coding defaults first, suggests a GL account for the remaining lines from your chart of accounts, and sends anything it is unsure about for review before approval.
- Vendor coding defaults. Set a default GL account, department and cost center per vendor, and they apply automatically.
- Line-level AI suggestions. For lines without a default, AI suggests a GL account per line. A suggestion that is not in your chart of accounts is flagged for review rather than used.
- A person decides. Your team reviews the coding on each line and can change it before the invoice is approved.
- Approval by GL account or department. Approval rules can route invoices by GL code or department, so the right budget owner confirms the coding.
- Posts to your ledger. Approved bills sync to QuickBooks Online, Xero, FreshBooks, Zoho Books or Business Central with their coding, and the invoice history records who coded and approved each one.
Aequo AP does not pay vendors; payments stay in your existing process. See how invoice capture and coding work in Aequo AP.
Frequently asked questions
What is an example of a GL code?
In an illustrative chart of accounts, 6100 might be Software subscriptions and 6200 Rent. A coded line could read 6100 / Sales / New York: the account, then the department, then the location. Your own numbers and segments depend on how your chart of accounts is set up.
Who should code invoices: AP or the budget owner?
Usually both. AP applies the vendor default or a first pass, because AP sees every invoice. The budget owner or approver confirms it, because they know what was bought and why. Finance reviews coding during the close.
Should every invoice line be coded separately?
Code at the line level when lines go to different accounts or departments, for example a laptop and a software license on one invoice. If every line is the same kind of cost, one account for the whole invoice is fine.
How do I code an annual subscription paid up front?
Code the payment to a prepaid expenses asset account, then move one month’s share to the expense account each month of the term. That keeps the cost in the periods that benefit from it instead of all in the month it was billed.
What is invoice coding software?
Invoice coding software suggests or applies the GL account and dimensions for each invoice line, using vendor defaults, past coding and the line description, and checks the result against your chart of accounts. A person should still review the coding before it is approved and posted.
Automate matching, approvals and exception handling
Aequo AP captures invoices, matches them to purchase orders and receipts, routes approvals and flags duplicates and exceptions, then syncs with QuickBooks Online, Xero, FreshBooks, Zoho Books or Business Central.
Related guides and tools
- General ledger (glossary)The record every coded invoice posts to.
- Invoice approval routingRoute invoices by amount, GL account or department.
- AP month-end closeWhere coding gets reviewed before the books close.
- Three-way matchingPO invoices inherit their coding from the PO.
- QuickBooks Online class trackingClasses and locations for multi-site businesses.
- Accrual accounting (glossary)Why prepaid and accrued costs are coded differently.
- Automated invoice processingCapture, coding and approval in one flow.
- Approval matrix templateSet who approves which spend.
Sources
Checked on November 9, 2026. Vendor capabilities and prices change; confirm current details with each vendor.
- Xero, General ledger accounting guide — the five account types and how GL code ranges vary by software
- Xero, How to track business expenses — tracking categories for projects, departments and cost centers
- QuickBooks, Turn on class tracking — class tracking plans, per-transaction or per-row classes, unassigned-class warning
- QuickBooks, Set up and use location tracking — location tracking plans and what locations represent
- IRS, Tangible property final regulations — de minimis safe harbor thresholds and accounting policy requirement
- IRS, Publication 551, Basis of Assets — sales tax, freight and installation as part of an asset’s cost