# Credit Card Statement Categorization, Step by Step

> A step-by-step method for credit card statement categorization: clean merchant names, write rules for repeat lines, split mixed purchases, and check totals.

- Canonical: https://www.moneyos.cc/blog/credit-card-statement-categorization
- Author: MoneyOS (https://www.moneyos.cc/about)
- Category: Credit cards and Amex (https://www.moneyos.cc/blog/category/credit-cards)
- Published: 2026-03-22T08:43:48.000Z
- Updated: 2026-03-22T08:43:48.000Z

Credit card statement categorization means giving every purchase line on your statement one spending category, such as groceries or dining out, so you can total each one. The reliable method is to clean the file, rename messy merchants, write a rule for each repeat merchant, split mixed purchases, and check the totals against the statement.

This post walks through each of those steps with an example statement, then covers the errors that creep in and how to keep your categories comparable from one month to the next.

## What does credit card statement categorization involve?

Credit card statement categorization involves six steps that turn a raw export into a list where every purchase has a category and the category totals match the statement. Most of the work happens once, in the first month. After that, rules handle the repeat merchants and you only review the new ones.

Here are the six steps in order.

1. **Export the statement as a file.** Download the statement period as a CSV from your card's website. A CSV has one row per transaction, which is far easier to sort than a PDF.
2. **Prepare the file.** Remove payments and transfers, check that dates are in one format, and make sure purchases and refunds have consistent signs.
3. **Clean the merchant names.** Replace each raw statement string with a name you recognize.
4. **Assign categories with rules.** For each merchant that appears more than once, write one rule that sets its category every time.
5. **Split mixed purchases.** Break a single line that covered two kinds of spending into two amounts.
6. **Reconcile.** Add up the category totals and compare them with the purchase total on the statement.

The table below shows step 3 and step 4 on six lines from an example statement. The merchant strings are made up for this example but follow the patterns real statements use.

| Raw statement string | Cleaned name | Category |
| --- | --- | --- |
| SQ *BLUE FERN COFFEE 0423 | Blue Fern Coffee | Dining out |
| TST* MARGO'S TAQUERIA | Margo's Taqueria | Dining out |
| HARBORMKT #1182 PORTLAND OR | Harbor Market | Groceries |
| PAYPAL *STREAMBOX | Streambox | Subscriptions |
| CLOUDLINE HOSTING 8005550142 | Cloudline Hosting | Software |
| SHELLWAY 57731 FUEL | Shellway | Gas and fuel |

Two of these six strings start with a payment processor prefix, one ends in a phone number, and one includes a store number and a city. None of them is the name you would say out loud. That gap is why cleaning comes before categorizing.

If you have not settled on a list of categories yet, start with a short one and add to it only when a category grows too large to be useful. The post on [credit card spending categories](/blog/credit-card-spending-categories) gives a starter list and the reasoning behind each one.

## Preparing a statement file before you categorize

Preparing a statement file means removing the lines that are not spending, putting every date in one format, and making the signs on amounts consistent. A payment to the card is not an expense, and leaving it in doubles your total. Five minutes of preparation saves an hour of confusion later.

Start with payments. Every statement includes at least one line for the payment you made toward last month's balance, often labelled "PAYMENT THANK YOU" or "AUTOPAY". These lines move money from your bank to the card. They are not purchases, so delete them or give them a category you exclude from totals, such as "Transfer".

Next, look at the signs. Some card exports show purchases as positive numbers and payments as negative. Others do the reverse. A few use separate debit and credit columns. Pick one convention, purchases positive and refunds negative is the easiest, and convert the whole file to it. If a refund is left positive, it will be counted as another purchase.

Then check the dates. A CSV often has two dates per row, the transaction date and the posting date. Use the transaction date for categorizing, because it is when you actually spent the money. Make sure every row uses the same format. A spreadsheet that reads some rows as day-month and others as month-day will sort them in the wrong order.

Finally, keep the original file untouched and work on a copy. If a step goes wrong, you can start again from the export. The post on [credit card transaction history](/blog/credit-card-transaction-history) explains how long your issuer keeps these files online and how to save your own copy each month.

## Merchant rules for repeat statement lines

A merchant rule is an instruction that says "any line whose name contains this text gets this category". One rule handles every future charge from that merchant, so you categorize your coffee shop once instead of twenty times a month. Rules are what make categorization fast after the first month.

Write the rule on the part of the string that never changes. For "SQ *BLUE FERN COFFEE 0423", the store number at the end may change between visits, and the "SQ *" prefix appears on hundreds of unrelated merchants. The stable part is "BLUE FERN". A rule on "BLUE FERN" catches every visit and nothing else.

In a spreadsheet, a rule can be a two-column lookup table, with the matching text in one column and the category in the other. A formula then searches each statement line for each matching text and returns the category. In a tool that categorizes for you, the rule is usually created when you correct a category once.

Some merchants need more than one rule. A large online retailer may sell groceries, books and electronics under the same statement name. A rule cannot tell those apart, so give that merchant a default category, such as "Shopping", and review its lines by hand each month.

Order matters when rules overlap. If one rule matches "MARKET" and another matches "HARBORMKT", put the more specific rule first, or every Harbor Market trip will land wherever the general rule sends it.

MoneyOS works the same way without the lookup table. It categorizes every line of an imported file, and when you change a category it remembers the correction. The [how it works](/#how-it-works) section of the homepage shows the import step.

## How should a mixed purchase on a statement be categorized?

A mixed purchase should be split into two or more lines, each with its own category and amount, as long as the parts are large enough to matter. A $140 warehouse store run that was $95 of groceries and $45 of household goods belongs in two categories. Leaving it whole overstates one and hides the other.

Use the receipt if you have it. Add up the items that belong to each category, and if tax was charged on only some items, add that tax to their group. The two parts must add up to the statement amount exactly. If they are off by a few cents, put the difference in the larger part.

Without a receipt, estimate. One approach is a fixed split for a store you visit often, such as 70% groceries and 30% household. An estimate is fine as long as you apply it the same way every month, because your trend stays honest even if a single month is slightly off.

Decide on a threshold below which you do not split. Splitting a $12 pharmacy purchase into toiletries and snacks takes more time than the detail is worth. A threshold of $50 or $100 keeps the work in proportion.

In a spreadsheet, split by inserting a second row with the same date and merchant, then changing both amounts and categories. Add a note such as "split from $140.00" so the reconciliation step can find it.

## Categorization errors from messy statement merchant names

Categorization errors from messy merchant names happen because the name on a statement comes from how the business set up its card processing, which is often not the name on its sign. Abbreviations, processor prefixes and truncated names make different merchants look alike and the same merchant look different. Both cause wrong categories.

Processor prefixes are the most common problem. Small businesses often take cards through a payment service, and that service adds its own short code to the start of the name. A rule that matches the prefix alone would put a coffee shop, a hair salon and a plumber in the same category. Match on the business name after the prefix instead.

Truncation is the second problem. Statement name fields are short, so long names often get cut off. "HARBORVIEW MEDICAL CENTER PHARMACY" may arrive as "HARBORVIEW MEDICAL CEN". A rule written on the full name will miss it.

Parent company names are the third. A restaurant may bill under the name of the company that owns it, which can sound like a property firm or a hotel. Search the full string together with the city if a line makes no sense. The post on [how to search credit card purchases](/blog/search-credit-card-purchases) covers finding the store behind an unfamiliar statement name.

The fourth problem is the same merchant appearing in several forms. One gas station chain may show its brand name at one location and a franchise owner's name at another. Each form needs its own rule, or one rule on a shared fragment.

Check your categories after the first month by sorting the file by category and reading each group. A line that does not belong usually stands out at once.

## Keeping statement categories consistent month to month

Keeping categories consistent means using the same list and the same rules every month, so a change in a total reflects a change in spending rather than a change in labels. If you file a pharmacy under "Health" in March and "Shopping" in April, both months are wrong for comparison.

Write your category list down and keep it next to your rules. When you are tempted to add a new category mid-year, ask whether an existing one already covers it. If you do add one, go back and recategorize the earlier months, or note the date you made the change so you do not read the jump as real.

Treat edge cases the same way every time. A gift for a friend, a work lunch you will be reimbursed for, or an annual membership fee each needs a fixed home. Write down the decision once. "Work lunches go in Reimbursable" is a rule too, even if no software applies it.

If you use more than one card, use the same categories on all of them. Combined totals only make sense when groceries on one card and groceries on the other share a label. Pulling every account into one place automatically can make this easier, and the post on [financial account syncing](/blog/financial-account-syncing) explains how that works and what it needs access to.

Review the rules every few months. Merchants change processors, stores close, and new subscriptions arrive. A rule list that was complete in January will have gaps by June.

## Does the categorized statement still add up to the balance?

A categorized statement should add up to the statement's purchase total once payments and refunds are handled the same way the statement handles them. If the category totals and the statement disagree, a line was dropped, duplicated, split badly or left with the wrong sign. Finding it now is easier than finding it in three months.

Here is how to reconcile an example month. The statement shows $1,842.36 in purchases and $79.00 in credits, for a net of $1,763.36. Your category totals add up to $1,921.36. The difference is $158.00, which is exactly twice the $79.00 credit, which means the refund was entered as a positive purchase instead of a negative one. Flip its sign and the totals match.

Common causes of a mismatch, in the order worth checking:

- A refund with the wrong sign, which shows as a difference of twice the refund.
- A split line whose parts do not add up to the original.
- A payment that was not removed, which shows as a difference equal to the payment.
- A pending transaction in your file that the statement does not include yet.
- Interest or a fee that the statement lists separately from purchases.

Compare against the purchase total, not the closing balance. The closing balance includes the previous balance, payments, interest and fees, so it will rarely match your category totals even when every line is right.

Once the totals match, you have a categorized statement you can trust. Save it, and next month the rules you wrote will do most of the work.
