Walk through the startup graveyard and you’ll find a bunch of misfits, over-funded vanity projects and sorrowful stories of amazing ideas, bad luck and dreadful timing.

Startups die for all sorts of reasons, and it’s always sad. Sometimes investors pull the plug, sometimes founders give up and go home, and sometimes you can do everything right and still fall flat on your face.

When you consider that anything between 60 and 90 percent of startups doesn’t make it past their fifth birthdays, it’s worth taking the time to ask why.

So here are some of the things that can go wrong for startups and what you can do to find success.

Not finding a product-market fit

The most basic reason for startup failure stems from not finding a profitable product-market fit. In fact, 42 percent of startups die this way, according to CB Insights.

Though there’s no guarantee that any new product idea will resonate with consumers, founders can reduce their risk by employing lean startup methodology. This is a practice that encourages a scientific approach to building businesses.

A core principle of the lean startup methodology isto build quickly, measure and learn. By producing a usable prototype that you can test in the wild—known as a minimum viable product (MVP)—it’s possible to get feedback on your idea and iterate cheaply.

In startup accelerators this testing and validation period will usually take around three to six months, by which time you will know whether to invest further and grow, to pivot or to shut down entirely.

The upshot is, you don’t have to spend millions on building a unicorn only to find it’s a donkey.

Being too early to market

Timing is a huge factor in the success of any business. Release a product too early and the market might not be ready for it. Many of your resources will then be spent trying to educate consumers who are unsure of your value proposition.

It doesn’t matter if you have a startup or a multi-billion dollar enterprise either; you can’t force a market to pick up a product and love it – think Google Glass.

As another case in point, in 1983 the late, great Steve Jobs spoke about Apple’s strategy to put computers in booksthat you could “carry around with you and learn how to use in 20 minutes”. Jobs said Apple wanted to include “a radio link in it so you don’t have to hook up to anything and you’re in communication with all of these larger databases and other computers.”

Ten years later, Apple launched the Newton; a palmtop, book-like computer. Unfortunately, it was too expensive, clunky, and a huge commercial flop. While the idea was good, the technology did not support it and the market was not ready.

If the Newton sounds familiar, it’s not surprising. In 2010, after a 27-year wait, Apple finally released the iPad. Only this time, the timing and tech was just right.

Being too late or being unlucky

Releasing a product late will ultimately mean you are going up against the established competition. While not necessarily a bad thing (at least you know a market exists), you will have to differentiate your product if you want to succeed.

Taxify, an on-demand taxi app, took on Uber in London in late 2017. The Estonia-based startup had the right approach, promising cheaper fares and better pay for its drivers. While the unique selling proposition (USP) was clear, and there was a good chance of success, the timing was horrible.

Almost immediately, Uber was banned from operating in the city by the London Transport Authority and Taxify was also forced to close, three days after launching.

Taxify is operating successfully in 20 countries around the world – so it’s hardly a failure – but it goes to show that you can do everything right and still get caught out by unforeseen circumstances.

Mismanaging and failing to adapt

Successful startups go through a predictable life cycle, from the early stage ideation to validation, growth, and scaling. And once they start to operate at scale, they often need to implement more rigid management practices and processes. For this reason, founding teams have a tough transformational job on their hands, and many make mistakes as the company evolves.

Unfortunately, bad management is to blame for more than half of startup failures in the UK, according to the Telegraph. Inept hiring and firing practices, focus on vanity metrics, financial mismanagement, inefficient processes and sketchy organisational structures can all impact a company’s bottom line.

Not having a clear marketing strategy

In 10 Lessons from a failed startup, Mark Goldenson cites lack of marketing expertise as being one of the primary reasons for the failure of his startup, PlayCafe.

Unfortunately, many founding teams are too wrapped up in things like seeking investment, hiring, and developing the product to really concentrate on marketing – and that’s understandable. It’s worth considering taking on an expert marketer to relieve this pressure and to allow you to focus on what’s most important to the business.

As a side note, inexperienced marketers may try to boil the ocean and appeal to everyone, but this will only waste time, money and resources. In the early stages of your startup, it should be your goal to find a profitable, enthusiastic niche market and then diversify and grow when it makes sense to do so.

Facebook, for example, grew wildly popular by first targeting college students, and then broadening its appeal.

A final word

Startups are the lifeblood of the economies; they disrupt stagnant industries, they improve customer service, they force major players to up their game, and they inspire and create opportunities for young professionals hungry for work experience. Though a good percentage fail, they still have an impact – even the death of a startup can spark innovation.

If you achieve your exit, turn your startup into a lifelong project, or even if you fail in trying, it’s worth the journey. Just make sure you do it with your eyes wide open.