Unless you're talking about smoking, no one wants to be known as a quitter. In fact, there's such a cloud of shame associated with quitting that some people insist on persevering at all costs.

You only have to spend a few minutes on social media to find a quote that reminds you "Failure only happens when you give up trying" or "Winners never quit." These "inspirational" quotes and "motivational" memes imply that giving up on your goals somehow means you've given up on life.

But, quite often, the refusal to quit doesn't stem from mental strength. Instead, someone might keep going because he's acting tough.

While there's a lot to be said for perseverance, mentally strong people know quitting doesn't make you a loser. In fact, it often takes incredible mental strength to walk away from a goal.

Whether you declared you were going to run a marathon or you said you were going to pay off your house in five years, there are times when quitting could be the wisest thing you could do.

Here are five times mentally strong people give themselves permission to quit work on a goal:

1. When their goals have changed.

Mentally strong people challenge themselves to become better. And that means their priorities shift and their goals change. So to make room for bigger and better goals, they abandon their old ones.

If you find yourself stuck in a certain place in life, you might not be quitting often enough. As you grow and change, you should be outgrowing some of your old goals and adopting ones that will challenge you to reach your greatest potential.

2. When the process doesn't align with their values.

If the steps required to reach a goal don't align with a mentally strong person's values, they'll put on the brakes. They know that living according to their values is the key to living a successful life.

The hard work, dedication, and commitment it may take to reach a goal could mean less time with your family, less energy for other endeavors, and fewer opportunities to pursue the things that matter most. Don't disregard your values to prove to yourself--or anyone else--that you can achieve your goal.

3. When the reward isn't worth the effort.

Mentally strong people ask themselves whether the reward is worth the effort required to achieve their goals. They're not ashamed to give up when the end goal doesn't justify the time or energy it takes to achieve it.

Whether you set out to lose 15 pounds or you wanted to earn $100 more a month, your goal might not sound all that difficult on the surface. But when you start taking steps to reach those goals, you might find the process is more cumbersome than you envisioned. Don't feel compelled to keep going at all costs because you're too afraid to step away from your goal.

4. When they've dug themselves into a hole.

Mentally strong people know that the only thing worse than being on a sinking ship is staying on board until it's completely sunk. They acknowledge when things aren't going well and they're willing to walk away before things get worse.

Whether you've invested a lot of money in a business that isn't profitable, or you've devoted endless hours to a project that no longer seems viable, it can be tempting to keep going. But saying "I've invested this much--I might as well keep going" doesn't make much sense. Know when to cut your losses and walk away.

5. When the cost outweighs the benefit.

Mentally strong people calculate the risk associated with reaching their goals. They monitor the costs and they're willing to step away when the cost outweighs the benefit.

Sometimes, the excitement over the benefit of reaching your goal can cloud your judgment and cause you to overlook the price you'll pay for achievement. If your goal has a negative impact on your health, your relationships, or your wallet, rethink your options.

How to make the decision to quit.

Quitting your goals shouldn't be a decision you take lightly, nor one that you make out of haste. Feeling tired, frustrated, or disappointed doesn't mean you should give up.

Make the decision with a careful balance of your emotion and your logic. Take time to consider the pros and the cons of continuing versus the pros and the cons of quitting.

Just remember that quitting doesn't mean you're a failure. Giving up on one goal could actually be a steppingstone to your future success.

Published on: Nov 21, 2016
The opinions expressed here by Inc.com columnists are their own, not those of Inc.com.