What Is a GL Code in Accounting? Expense Coding Explained
A GL code (general ledger code) is the account number from a business's chart of accounts that says where a transaction belongs in the books, such as 6100 for fuel or 5100 for job materials. Each card charge, bill and reimbursement gets one, and the totals by code add up to the financial statements.
The bookkeeper codes a crew lead's $86 diesel charge on the company card to 6100 Fuel and a $1,240 electrical supply house bill for a panel upgrade to 5100 Job materials, tagged to that customer's job.
This post covers GL codes in accounting, not the general liability (GL) class codes insurers use to price a policy.
What a GL code is made of
GL stands for general ledger, the master record where every transaction is filed under an account. Each account has a number and a name, and the GL code is the number. Picking 6100 and picking Fuel are the same decision; the number is just faster to type.
The codes come from your chart of accounts, the list of accounts your business has set up, so they are local. 6100 is fuel at one company and advertising at the next.
Larger organizations string several codes together. UC Berkeley's chartstring combines an account code, which records what was spent, with a department ID, which it calls "the cost center where the expenses will be charged," plus fund, project and other fields. Small businesses rarely need that. The GL code stays the account alone, and the job, property or department goes in a separate field, such as a class or cost center, not in the account number.
How GL codes get assigned to card charges
A card charge reaches your books through a bank feed, the connection that downloads card and bank transactions into your accounting software. The feed brings the date, the amount and a merchant string like "SUPPLY HSE #0412." It doesn't say what was bought, so someone still has to pick the code.
That is where coding goes wrong. A supply house sells pipe, tools, safety gear and coffee, and a bookkeeper looking at the feed a week later can only guess. The person who made the purchase knows, which is why coding at the time of purchase, with the receipt in hand, beats coding at month-end, when the books are closed.
Software can handle the predictable part. In QuickBooks Online, bank rules fill in the category when a transaction's description, bank text or amount meets up to five conditions you set, and only one rule applies per transaction. Intuit says to use auto-posting with caution, since those transactions skip your review. Rules suit single-purpose vendors, such as a fuel station, and fail on vendors that sell a bit of everything.
Every coded charge still has to tie back to the statement. Our credit card reconciliation guide covers matching each charge to a receipt, a category and a job.
How GL codes get assigned to bills
Bills are vendor invoices you pay later, through accounts payable, the list of what the business owes its suppliers. Whoever enters a bill codes each line, and one bill can split across several codes: a supply house invoice might hold job materials, a rented trencher and a box of safety glasses.
Recurring bills are the easy part. Insurance, rent and the phone bill land on the same account every month, so set that coding once. A bill tied to a purchase order, an approved request to buy, can take its GL code and job from the order.
Approval is the second check. In a sound invoice approval workflow, each invoice is coded before it reaches an approver, so the approver can check the code as well as the amount. A project manager is best placed to spot a bill on the wrong job.
Worked example: one receipt, three GL codes
A plumbing tech spends $595.20 at a supply house on the company card. The receipt splits like this, with sales tax included in each line:
| Item | Amount | GL code | Job |
|---|---|---|---|
| PEX pipe, fittings and two shutoff valves | $438.90 | 5100 Job materials | Job 2417 |
| Pipe cutter and drill bits | $101.60 | 6500 Small tools | None |
| Thread tape and shop rags for the van | $54.70 | 6550 Shop supplies | None |
| Total | $595.20 |
Now suppose the whole charge goes to 5100 on Job 2417, because that was the job of the day. The job carries $156.30 of cost it never used ($101.60 + $54.70). On a $2,800 repipe, that cuts the job's margin by 5.6 percentage points on paper ($156.30 divided by $2,800), and the tools and supplies never show up in overhead, the general costs of running the shop. Code the whole thing to 6400 Office supplies instead, and Job 2417 looks $438.90 cheaper than it was.
If the month is still open, edit the charge into the three lines. Once it's closed, the fix is a journal entry, a manual entry that moves amounts between accounts. A debit adds to an expense account and a credit takes it back out:
| Account | Debit | Credit |
|---|---|---|
| 6500 Small tools | $101.60 | |
| 6550 Shop supplies | $54.70 | |
| 5100 Job materials, Job 2417 | $156.30 |
The debits match the $156.30 credit, so the entry balances, and total expenses don't change.
What goes wrong when expenses are miscoded
Job and property reports break first. For a property manager, a wrong property tag moves money between owners: a $1,150 water heater tagged to the wrong building makes one owner pay for another owner's repair.
Taxes come next. For 2026, business meals are generally 50% deductible, with exceptions. IRS Publication 463, the edition for 2025 returns, applies the 50% rule to a meal with a client or similar business contact when you or an employee is there and it isn't lavish, and to meals on business trips that keep you away long enough to need sleep or rest.
Other meals follow other rules. A holiday party or picnic for employees is generally fully deductible. From 2026, meals you provide staff on your premises for your own convenience generally aren't deductible at all, under section 274(o) of the tax code. Entertainment, such as game tickets for a client, isn't deductible either.
So a $180 lunch with a building owner to go over a bid, coded to Job materials, gets deducted at $180 instead of $90 unless your tax preparer catches it. Since each kind of meal is treated differently, give each its own GL code, and let your CPA confirm which rules apply to you.
Big purchases cause a different problem. A $14,000 trailer coded to Repairs makes this year's expenses look $14,000 higher and leaves an asset off the balance sheet, the report of what the business owns and owes. Whether you can still deduct it in one year is a question for your CPA, but the books should show the trailer as equipment.
GL codes vs cost codes
A GL code says what kind of cost something is: materials, labor, fuel. A cost code says which part of the job it went to, such as rough-in plumbing, drywall or site work. The $438.90 of PEX above is 5100 Job materials in the books and a rough-in plumbing cost code on Job 2417. Our guide to construction cost codes covers building the cost code list.
How to keep GL coding consistent
Consistency beats the perfect account. A few habits get most teams there:
- Write a one-page coding guide with your 20 most common purchases and the code each one gets.
- Show field staff a short list of codes, or only the job, and let the bookkeeper own the rest.
- Set rules for single-purpose vendors and review mixed vendors by hand.
- Before each month-end close, run spending by vendor and look for single-purpose vendors, such as the fuel station or the phone company, coded to more than one account.
If your team pays with company cards, Clyr's coding rules match on vendor, amount or card and set the GL account along with the job, property, department or cost code. For anything the rules don't cover, it suggests a code from your own coding history and applies it only above a confidence threshold. Anything below waits for a person, and any human edit wins.
FAQs
No. Each business builds its own chart of accounts, so the same number can mean different things at two companies. The exceptions are regulated settings: HUD, the U.S. Department of Housing and Urban Development, for example, publishes a uniform chart for the apartment buildings it insures.
Often, but not always. In QuickBooks Online, the category you usually pick on a bank transaction is an account from your chart of accounts, so it is the GL code itself. Some expense apps use friendlier labels, such as Meals or Tools, and map each one to a GL account behind the scenes. If a label maps to the wrong account, every expense under it lands in the wrong place, so check the mapping whenever your chart of accounts changes.
Usually into the same GL code as the item it was charged on. IRS Publication 334 for 2025 says to treat sales tax you pay as part of the cost of what you bought, and to add it to the depreciable basis when the item is equipment. On a receipt split across several codes, spread the tax over the lines in proportion to their amounts. Sales tax you collect from customers and pay over to the state is generally not income.
Leave the closed year alone in your software and talk to your CPA. A mix-up between two deductible expense accounts usually doesn't change the tax owed, because both reduce income the same way. An error that changes taxable income, such as a full deduction for a meal that was only 50% deductible, may need an amended return.
No. Cash basis records an expense when you pay it, and accrual accounting records it when you owe it. That changes when an expense hits the books, not where: a $1,240 supply house bill is 5100 Job materials either way. Only the month it lands in can differ.
