Budgeting and financial planning aren’t the most fun and exciting parts of franchise ownership, but there’s certainly no denying their importance. Only by creating a complete picture of your costs and expenditures, and measuring those totals against your revenues, can you truly determine whether your franchise is financially healthy or in danger of failing.

Budgeting helps business owners see and understand what they’re spending money on, and where they might be more efficient. By tracking costs and revenues on a regular basis, you can see trends and learn to anticipate needs, whether it’s scaling up or cutting back.

If you’re baffled about the best way to set up a budget for your franchise business, here’s some helpful advice to get you started.

Remember that if you’re budgeting for a brand-new franchise, you’ll have to include some things an established business can avoid, such as the initial franchise fee. However, without real costs and revenues to plug into your budget, you’ll have to do some research on average costs and revenues in your sector and region, and use those figures to make projections. You should have the opportunity to speak to existing franchisees about their experience and the model. This is called validation and is the single best way to ensure accuracy of your projections and get a sense of how franchisees view the franchisor, the support they provide, and the overall opportunity.

Here’s how to set up a budget for your franchise business, whether it’s brand-new or established:

Step 1 – Calculate revenues

First, the good stuff: incoming cash. For some franchises, there’ll only be one source of income, while others may have sales from multiple lines of business. Tally the revenues for each individual month and enter them into a spreadsheet, or your accounting software.

Step 2 – Add up all your fixed costs

This is where you calculate all those unavoidable expenditures that crop up month after month, including rent, fees for services such as internet and cellphone (assuming they’re fixed and not usage-based), any regular costs for equipment and supplies, and insurance.

Step 3 – Determine your variable costs

Next up are all the costs that fluctuate from month to month depending on various factors. These can include costs for utilities, marketing, training and professional development, new equipment, travel costs, shipping and warehousing, and commissions.

Payroll might be a fixed cost at your franchise business, or it might vary based on seasonal demand spikes.

Some of the variable costs, such as travel or training, are commonly known as discretionary expenses, meaning that they’re nice to have but not essential. These costs are the first ones you should look to reduce or eliminate when revenue is in decline.

Step 4 – Try to predict one-time expenditures

If you’re launching a new franchise, here’s where you’ll enter the initial franchise fee that comes with getting started. New businesses may have other large, important costs to enter here, such as construction and equipment acquisition.

More established businesses may also face significant, irregular one-time costs for construction, renovations, repairs, or replacement equipment.

Step 5 – Set aside some money for unexpected situations and emergencies

Sometimes you can plan for one-time costs. For instance, you might have enough income to replace a different employee’s computer every quarter until all your staff have upgraded machines.

Other times, however, a major expenditure arrives without warning, such as the sudden failure of an essential piece of equipment, a cyber-attack on your business that requires expert help, or the loss of inventory due to water damage from a broken pipe.

While the costs of some emergencies can be mitigated with appropriate insurance coverage, others will require franchise owners to adjust and react quickly. If such a situation arises, it’s always helpful to have extra cash on hand. It could mean the difference between being able to keep your business open when the worst happens, or having to forgo sales and revenue while you seek emergency financial assistance.

Step 6 – Calculate profits and losses

You’ve done the work; now it’s time to see the results. Subtract your monthly fixed and variable costs from each month of revenue data and see whether you’re earning profits or taking losses. Maybe your sales spike at a certain time of year but flatten out in other months. You’ll also see how your expenses evolve over time, and whether any of them are out of line.

Once you’ve gathered all the numbers, use them to look ahead and imagine how the future might play out for your franchise. Did you lose money because you had to spend big on new equipment, or replace damaged inventory? If major costs are coming up, when’s the best time to tackle them? Can you adjust your staffing and hiring schedules to save money at slow times and ramp up again when sales climb?

Now that you’ve built your budget, continue to collect and record all of this essential financial information going forward so you can use it to help your franchise grow and succeed.