In the world of startups failure is cool. Quitting is not.

Fail fast may be the mantra of entrepreneurs, but the same determined young founder will be told again and again about the value of perseverance and sheer grit. It’s contradictory advice in some ways, so how can a  naturally stubborn entrepreneur learn to draw the line between healthy determination and unproductive obstinance? Or to put it another way, how can you learn to quit with good timing and grace?

Economists tell us that quitting is actually often the smart move and that while humans have a natural tendency to avoid losing sunk costs (otherwise known ‘throwing good money after bad’), cutting your losses is frequently the better course of action. Freakonomics co-author Stephen Dubner explained the rationalist’s approach to quitting on NPR:

Time and effort and even stick-to-itiveness are not in infinite supply. Remember the opportunity cost: every hour, every ounce of effort you spend here cannot be spent there....

Stella Adler, the great acting coach, used to say: Your choice is your talent. So choosing the right path, the right project, the right job or passion or religion -- that's where the treasure lies; that's where the value lies. So if you realize that you've made a wrong choice -- even if already you've sunk way too much cost into it -- well, I've got one word to say to you, my friend. Quit.

All of which might make perfect sense to you but it’s generally not in the character of entrepreneurs, who tend to be never-say-die types, to quit. So how can you get better at the emotional side of giving up?

That’s the subject of two interesting recent posts. One by author and time use expert Laura Vanderkam is titled "Why You Should Learn to Give Up a Goal Without Guilt." In it, she explains that while having goals is a huge help if you want to accomplish great things, too often we are slavishly loyal to targets once we set them. Usually, she writes, "the reason for letting go of a goal is that we’ve evolved away from the goal, or we thought it sounded good at the time and it no longer does."

Outgrowing goals is fine, but if you’re a high achiever who is prone to guilt when you quit on a goal, Vanderkam suggests pulling a bit of a bait and switch on yourself. "The best way to deal with that is to set a new goal--ideally related, but somewhat more in line with your new reality. You may have decided you no longer want to earn a master’s degree, but you can still take a course a year in a subject you find fascinating. You don’t want to invest the time in getting fast enough to qualify for the Boston marathon, but you could run it as a charity runner," she writes.

If swapping out one aim for another doesn’t help you shake outdated goals, then entrepreneur Alex Lawrence has another suggestion to help you quit before pig headedness leads to disaster. His idea: make a mental distinction between stopping and quitting. It’s an idea that came from him after he took a tumble and abandoned a bike race at the top of steep descent, fearing a worse crash if he tried to get down in his weakened state. He writes:

Many, many entrepreneurs like some of you are facing the same exact decision I did at the top of Mt. Baldy on Saturday. You’ve spent hours and hours preparing and working. You’ve spent lots of money (your own and maybe family, friends and investors, to). You’ve made many sacrifices to get and keep the business going. You’ve pushed yourself as hard as you can. Despite all of your efforts, sacrifices and hard work, the business just isn’t going like you’d hoped…

There is no honor in failing randomly. Failure is often (not always) a part of success, but it doesn’t mean you fail blindly. It doesn’t mean you fly down a road at 50mph when you know you’re going to crash.

So really think about it. Have you done everything you can and is your business still not where it should be? Be honest with yourself. If you take the easy answer on the way out, you are quitting. If you take the honest one, and it’s time, then you are stopping.

Stopping still sucks, he clarifies, but unlike quitting it’s smart and necessary. "The sooner you stop something dangerous, dumb or empty, the sooner you can start something awesome, smart and full of promise," he concludes.

Do you struggle to draw the line between healthy perseverance and unhealthy pigheadedness?