Once upon a time, 10 long years ago, I became the CEO of an early stage software company. I was hired by a private equity firm to get my arms around a business they felt had begun to veer in the wrong direction. It wasn’t a complete disaster, but several million dollars in, their consensus was that the three founders, while domain experts and important to the business, needed some “help”.

Five days later I was writing a $70,000 personal check to make payroll. Apparently we were short.

That was the closest near-death experience I’ve had running four tech companies, and for the longest time I pondered how on earth the founders had ever let it get to that point. Even more stunning was that they didn’t have a clue it was at that point.

Paul Graham of Y Combinator fame, wrote a great blog post several years ago that I point young entrepreneurs to from time to time. It’s about avoiding dying until you get rich. Every entrepreneur should read it.

Unfortunately, all too many early stage companies like to live in the land of the fairy tale, and don’t think about the choices they make in those early days as “what we need to do to avoid death.” It’s not that they shouldn’t be focused on what needs to happen to be successful, but when it comes to one thing – cash – a healthy dose of reality is essential to making it.

When you search on “why tech companies fail,” the Internet returns an endless list of articles that point to “running out of cash” as one of the top reasons.

While hitting a cash wall is often cited as the explanation as to why tech companies fail, the reality is that running out of cash is simply the outcome of the actual reason(s). And as a mentor to hundreds of early stage entrepreneurs over the years, I can say that those underlying reasons are incredibly consistent.

Here are my five tips to make sure the Big Bad Wolf doesn’t show up at your door:

1. Don’t build your product in a vacuum

If I had to pick one single thing that causes companies to run out of money, it’s a single-minded focus on blindly building product without actually talking to the market. In fact, CB Insights published a list of post-mortem essays written by 156 startup founders and investors as to why their companies failed. The most common reason, representing 42% of the respondents? They built products no one wanted.

I’ve watched founders blow millions believing they knew better than anyone they intended to actually sell the product to. Like many other mentors, I wish I had a dollar for every entrepreneur who’s told me, “When we launch this, people are going to love it!” Reality check: You are not Steve Jobs, and this is not the iPhone.

2. Don’t delay getting customers

Closely related to point 1. Customers mean money. Money means runway. Runway means continued viability. If you can’t convince someone to pay money for a mimimum viable product, even a little, then you better be Facebook or Twitter, with Facebook- or Twitter-sized investors. Customers are the best way to validate that you’re on the right track and keep you going with minimal dilution. In fact, they’ll help you attract investors at the right time, for the right valuation.

3. Don’t underestimate the effort to raise capital

First-time entrepreneurs, so shiny and new! If founders had any idea how long it takes and how hard it is to raise capital for the average startup, there probably wouldn’t be any. Most A-list angels and institutional investors are pitched hundreds of times a month. Hundreds. You are competing with the next founder with a great idea, and you’re hoping to come out on top. It’s incredibly difficult. Be prepared for enthusiasm that turns into reality that turns into exhaustion before success. And allow yourself six months (and the requisite cash resources) to get there.

4. Don’t scale too quickly

Whether you’ve successfully raised cash or are still self-funded for a period of time, nothing says “drain the bank account” faster than adding a whole bunch of people — and the costs that go along with them. The first few employees tend to be cheap, but as you get further away from the founding team, employees will want closer to a market rate of pay. Fixed costs can get out of control quickly and can deliver you to that cash wall a lot faster.

Scaling is about balance between three variables: what cash you are taking in, how quickly you’re spending it, and the forecast of how long it’s going to take you to get to the next significant milestone. If you err on the side of spending too early and too much, you’ll significantly increase your chances of running out of cash.

5. Don’t avoid the numbers

Someone told me several years ago that most North American corporate CEOs had a business/accounting/finance background, and the data tends to bear that out.

As a CPA myself, I instantly realized how a fundamental knowledge of finance and cash flow had provided me a solid foundation and discipline for managing young companies through the inevitable cash rough patches.

But I am continually surprised (and dismayed) at the number of founders who don’t understand the difference between bookings and revenue, or accounts receivable and cashflow, and who can’t do the simplest, accurate cash forecast.

When starting a company, the only thing that matters is having a rolling weekly, granular view of what cash is coming in the door, what cash is going out (itemized), and where that leaves the cash balance going into the next week.

If you can’t forecast that out at least half a year and have visibility into when cash runs out, you’ll leave yourself in the position I walked into 10 years ago: no cash left, and 45 people to pay.

Carol Leaman is CEO of Axonify. She is a four-time CEO, who sold her last company to Google.

Get more stories like this on TwitterFacebook