You’re finally going forward with a project you’ve been planning for years: Remodeling your outdated kitchen. You’ve saved money and you know you’ve got enough stashed away to pay for the job, or do you? A kitchen remodeling budget can quickly spiral out of control if you’re not careful.

“First of all, you’ve got to have a very clear plan, and you can’t deviate a lot,” says Hooper Patterson, an interior designer in Wilmington, North Carolina.

Remodeling magazine’s 2017 Cost vs. Value Report

The cost of a major kitchen remodel can range from $49,560 to $62,150 in a mid range house, estimating that homeowners recoup only 63 percent of that investment when they sell. Costs could exceed $100,000 in a high-end home. HomeAdvisor reports that most of its readers spent between $12,707 and $33,012 to remodel their kitchens. This is clearly not a job you want to mishandle. If your kitchen budget is $20,000 and you end up spending $40,000, or running out of money halfway through the job, you’re going to be in trouble.

Sticking to your budget

Make sure your budget is realistic. Toni Anderson of Orlando, Florida, has remodeled three kitchens and learned something new from each project. She has chronicled some of her remodeling adventures on her website, The Happy Housewife. She advises using Pinterest, Houzz or other tools to collect pictures of what you want months before you call contractors. Once you’ve got some ideas, start shopping both online and in the store to see how much your plans might cost. Use that information to refine your plans.

Kitchen remodeling costs more if you knock out walls and relocate plumbing, electric and gas lines rather than simply replacing old cabinets and appliances. Plus, you don’t know what extra work you’ll reveal when you open walls and floors.

The crisis moments in the TV remodeling shows where the contractor opens up a wall and finds an unexpected and expensive problem aren’t fiction. “Any time you relocate anything in your kitchen, you’re opening up the floodgates to cost,” Anderson says. “When you start opening up your walls, you discover other issues.” In one kitchen remodel Anderson and her family did, she discovered pipes behind the sink that needed to be replaced and ended up tearing out the back wall of the house.

Your choice of materials can also affect labor costs. A large tile laid in rectangles is easier to install than small tiles that have to be laid in a specific pattern, and a tile setter is likely to charge accordingly. Replacing an electric stove with another of the same size costs considerably less than installing a gas stove, which requires adding a gas line. “The labor costs can change based on what you choose,” Anderson says. You’re more likely to stick to your budget if you’re realistic going in about what you can afford. It’s easy to add upgrades here and there when you start shopping, and those small decisions can add up to big hits to your budget if you’re not careful.

“You yourself have to make sure you will stick to it,” Patterson says.

Here are six tips to help you stay on budget when remodeling your kitchen

Sign a detailed contract

It’s important that a contract spell out exactly what’s included, both in parts and labor. If your contractor is going to supply the faucet, specify the brand and model number. Will the cabinets come with trim or handles? Does the new flooring include baseboards? You want to be very clear going in exactly what the contractor is responsible for and what you’ll have to buy or what work will incur extra charges.

Shop early

You can get great deals on kitchen fixtures, sinks, tile, handles and pulls and even cabinets online. But you need to shop early enough to allow for delivery and, in some cases, returns and exchanges. Even if you’re shopping locally, expect to have to wait for tile, cabinets, countertops and other materials to be delivered. Craigslist, Facebook and eBay could yield some bargains if you have time to wait for the right items to show up. Shopping for appliances before your remodel is smart because your appliances could affect some construction choices. “I love Overstock or Amazon for getting the look you want for less,” Anderson says.

Resist being dazzled in the showroom

When you go to shop for granite or stone for countertops, tile for backsplashes and floors or even appliances, you are bound to be drawn to materials that are significantly more expensive than what you have budgeted. Be prepared to resist temptation. “I think people can get sucked in by the bells and whistles, and you have to really stick to your budget on those items,” Patterson says. “If you have a clear vision of what really calls to you before you go to shop, you’re not going to get sucked in by all the bells and whistles.”

Don’t make last-minute changes

Rerouting plumbing or electrical lines is much easier when the walls are open than when they are closed. Changing flooring is much easier before cabinets are installed. Make a plan and stick to it. If you’re thinking about a change, ask how much extra work it will entail and how much it will cost.

Be mindful of small things

Drawer pulls may not appear to be a big budget item, but if you choose pulls that are $10 each, 20 pulls will set you back $200. Cabinet pullouts, lighting fixtures, back splash tile, all those things can be surprisingly expensive if you’re not a careful shopper.

Budget for surprises

It’s rare that you can do a kitchen remodeling project without running into unexpected costs. Make sure you have enough of a cushion in your budget that you can pay for emergency plumbing repairs or whatever other ugly surprise is lurking behind your walls or under your floors.