Gross margin is your gross profit divided by your net sales, times 100, and gross profit is your net sales minus your cost of goods sold. If your store sells $1,500,000 in a year and the goods cost you $870,000, your gross profit is $630,000 and your gross margin is 42.0%, which tells you how much of every sales dollar is left to pay for everything else: the payroll, the rent, the insurance, and eventually you.

Net profit margin is the same division done at the bottom of the profit and loss instead of the top, after every one of those expenses, plus interest and taxes, has taken its turn. The rest of this guide lays out each formula, walks through the math on a single item and on a full store year, and covers the things that move gross margin at a hardware, paint, lumber, or farm and feed store. If the question on your mind is markup, the related but different math of setting a selling price from cost, that has its own margin vs. markup guide.

The four formulas

These are the standard definitions, and they stack on top of each other like a set of nesting dolls:

  • Gross profit ($) = net sales − cost of goods sold
  • Gross margin % = gross profit ÷ net sales × 100
  • Operating profit = gross profit − operating expenses, and operating margin % = operating profit ÷ net sales × 100
  • Net profit = what is left after all expenses, interest, and taxes, and net profit margin % = net profit ÷ net sales × 100

Net sales means your sales after returns and allowances. Cost of goods sold means what you paid for the merchandise that sold, including the freight it took to get it to your store, which is where a lot of stores fool themselves. Our cost of goods sold guide walks through exactly what goes into that figure.

The short version of how the three margins relate: gross margin tells you whether your pricing and buying are working, operating margin tells you whether the whole operation is working, and net profit margin tells you what you kept.

Worked example: one box of screws

Say a box of screws costs you $12.40 from your vendor and you sell it for $19.99 at the counter. Gross profit is $19.99 minus $12.40, which is $7.59, and gross margin is $7.59 divided by $19.99, times 100, which is 38.0%.

Notice what that 38.0% is not. It is not the 61% you would get if you divided the $7.59 by your $12.40 cost, because that figure is your markup, and mixing up margin and markup is one of the most common pricing mistakes in this trade. Margin divides by the selling price, markup divides by the cost, and the gap between the two widens the higher the numbers go.

Worked example: a year of a store's P&L

Now scale that same math up to a full year. Here is an illustrative profit and loss for a fictional single-location independent store:

Line Amount Share of sales
Net sales $1,500,000 100%
Cost of goods sold $870,000 58.0%
Gross profit $630,000 42.0%
Payroll $330,000 22.0%
Rent $96,000 6.4%
Everything else (utilities, insurance, software, supplies) $114,000 7.6%
Operating profit $90,000 6.0%
Interest $15,000 1.0%
Taxes $15,000 1.0%
Net profit $60,000 4.0%

Read that table top to bottom and you can see the whole story of running a store. Forty-two cents of every sales dollar survives the cost of the goods themselves, then $540,000 of operating expenses walks through the door as paychecks, rent checks, and utility bills, leaving six cents per dollar. Interest and taxes take their share, and four cents per dollar is what the year was worth.

That is why the gap between a 42% gross margin and a 4% net margin is not a contradiction or a sign the books are cooked. Gross margin has one job, which is to fund every other expense the store has, so when owners say "we run a 42 percent store," they are talking about the top of this table, and the bottom of the table is where the discipline shows.

What moves gross margin at a supply store

Gross margin is not a number you set once a year. It moves every day, with every discount at the counter and every cost increase on a purchase order, and these are the five levers that matter most.

Discounts and contractor pricing tiers

Contractor pricing keeps the pros coming back, and it is also where margin goes to get a haircut. Take an item that costs $12.00 and retails at $20.00, a 40% margin. Give a contractor 10% off and he pays $18.00, and your margin is 33.3%, not the 30% your gut tells you. Give him 15% off, he pays $17.00, and your margin is 29.4%, not 25%.

The discount comes off the selling price while your cost stays put, so every point of discount costs you more than a point of margin. None of this means you should stop giving contractor pricing, because that pro's volume and his charge account are worth plenty, but you should set your tiers with the real math in front of you. Our guide to tiered pricing and price levels for contractors goes deeper on structuring them.

Cost increases you haven't passed through

Your vendor raises a cost, the new purchase order comes in at the higher price, and the shelf tag stays where it was. Nobody made a bad decision, since everybody was busy on truck day, but your margin on that item dropped the day the truck came in, and it stays dropped until someone catches it. Across thousands of SKUs this is the quietest margin leak in the business, and it compounds because the next cost increase lands on top of the price you never raised.

Freight left out of cost

The freight you pay to bring goods into your store is part of what those goods cost you. IRS Publication 334 lists freight-in as part of cost of goods sold, and your accountant will treat it that way at year end even if your day-to-day reports do not. If your margin reports only look at the vendor's invoice price, your margin by product looks better than it is, and the error is worst on heavy goods where freight is a bigger share of cost. Our landed cost guide covers how to fold freight and fees into item costs.

Shrink

Shrink, the gap between what the system says you have and what the count says you have, ends up in cost of goods sold. Theft, receiving errors, and damaged goods that never got written up all raise your cost without raising a dime of sales. Regular cycle counts keep the number honest, while a store that only counts once a year finds out about eleven months of problems all at once.

Vendor rebates

Rebates from your buying group or your vendors are real margin, but they arrive after the sale, sometimes quarters after. Whether you net them against cost of goods sold or track them separately, know which version of gross margin you are looking at before you compare yourself to a benchmark. The industry figures below are quoted "after rebate," meaning rebates are counted back in, so a before-rebate number will look worse by comparison.

What moves net margin

Everything below gross profit on the P&L is what operating and net margin measure, and the big rocks are payroll, rent, and the long tail of everything else. In the example store, payroll alone is 22% of sales, which is what it costs to keep people on the floor who can tell a customer the difference between a deck screw and a drywall screw.

This is also why a gross margin drop hurts more than it looks. A 2-point slide in gross margin on $1,500,000 of sales is $30,000, which is half of the example store's entire $60,000 net profit, and the expenses below the line do not shrink to meet you, because rent is rent. If you want to see how many sales dollars it takes to cover those fixed costs in the first place, the break-even guide does that math.

Gross margin by department

A store-level margin of 42% is an average of very different departments wearing a trench coat. Items customers know the price of run thinner margins, while specialty, seasonal, and hard-to-find items carry the store, and lumber priced by the thousand board feet behaves nothing like the fastener aisle.

The practical move is to look at margin by department and by vendor, not only store-wide, and to pair it with how fast each department's stock turns. A department with a lower margin and quick inventory turns can earn more per dollar invested than a high-margin department where the inventory gathers dust. Margin tells you what you make per sale, and turns tell you how often you get to make it.

What a good gross margin looks like

The best public benchmark for independents is the NHPA Cost of Doing Business Study. Hardware Retailing's highlights of the 2025 study, covering fiscal 2024 across 1,082 independent home improvement stores, put the hardware store gross margin after rebate at 42.6%, the highest since 2016, with profit before taxes at 4.7%. Home centers in the same study ran a typical gross margin after rebate of 32.4%.

Two things to take from that. First, if your hardware store runs a gross margin in the low 40s after rebates, you are in normal company, and if you are well below it, the leak is probably somewhere in the five levers above. Second, look at the gap: roughly 38 of every 42.6 cents of gross margin goes to running the store, and 4.7 cents is what is left before taxes. Gross margin gets the headlines, but the distance between those two numbers is where store ownership happens.

How Rundoo shows your margins

In Rundoo, every product's detail page shows units sold, margin, and stock turns right above its transaction history, so the number is sitting there when a cost increase lands. Custom reports include an Inventory dataset you can group by location, department, and vendor, which is how you find out which departments are carrying their weight. Dooey, Rundoo's AI assistant, can run a routine that flags margin drops after cost changes and texts you a price-change alert, so the shelf tag stops lagging the purchase order.

On the accounting side, Rundoo keeps its own general ledger with a profit and loss and balance sheet under Admin > Reporting, and posts sales, tax, cost of goods sold, and payments to QuickBooks as nightly journal entries, which means the P&L table above is something you pull rather than something you build. There is more on the pricing and purchasing page.