This week as the world watched SpaceX’s Falcon Heavy rocket launch the red Tesla roadster to Mars and beyond and then land just as the rocket was meant to, we experienced success firsthand as a collective. But like every success, this one was built on the lessons learned through failures. Starting in 2006, 2007 and 2008 SpaceX had three failures that almost killed the company. Then in 2015–on Elon Musk’s birthday–a SpaceX rocket vaporized shortly after launch. And in 2016, a SpaceX rocket exploded while fueling (before it ever launched). During all of those challenges Musk was quoted as saying, “When something is important enough, you do it even if the odds are not in your favor.” And with that attitude he pressed on, delivering successful launches last year and this week.

Writer/director James Cameron said, “But failure has to be an option in art and in exploration–because it’s a leap of faith. And no important endeavor that required innovation was done without risk. You have to be willing to take those risks.” A Harvard Business School study by Shikhar Ghosh said that 75 percent of venture-backed start-ups fail. Failure is often based on the following reasons: lack of focus; lack of motivation, passion and/or commitment; too much pride (which overshadows listening to others’ advice); applying bad advice to the business; lacking a good mentor; and lack of business knowledge (in finance, operations and/or marketing).

But every failure can be mined for the a successful future.

A PsychCentral article titled “Failure = Motivation” says failure can be turned into motivation if you find the lesson, crush meritocracy, vow to be brave and redefine your dreams. Take the examples of some famous business people who originally failed. The book The Wisdom of Oz contains the story of Walt Disney losing his first animation job at the Kansas City Star because his editor felt he “lacked imagination and had no good ideas.” Disney then acquired an animation studio called Laugh-a-Gram, which he then drove into bankruptcy. Finally, he and his brother moved to California and started Disney Brothers’ Studio…and the result is a mouse-based empire.  Similarly, Theodor Geisel (better known as Dr. Seuss) failed 27 times after writing his first book, as that’s how many publishers rejected it. But he honed his craft and learned from mistakes and has sold more 600 million copies of his books. And even the current king of vacuums and modern electronic takes on older ideas failed repeatedly: Sir James Dyson went through 5,126 failed prototypes of his bagless vacuum system before he created one (the 5,127th) that worked, and he has since gone to create hand dryers and hair dryers and all kinds of other products as well as sponsor competitions for other inventors.

These three businessmen examples succeeded after failing because they were persistent in going after what they wanted. They didn’t give into fear or think maybe I’m not good enough. They kept trying, trying and trying again (or in Yoda-speak “doing” since there is no try). Oprah was the same way. She was fired from her first TV reporting job for being “too emotionally invested in her stories” and “unfit for television news”, but that obviously didn’t stop her.

In a Harvard Business Review article and related video about strategies to learn from failure, Professor Amy Edmondson says that people and organizations can only learn from failure if they don’t think that all failure is bad (some of it is good), if they don’t play “the blame game”, and  if they can learn to analyze failure in all of its complexity (not saying the quick answer of “this failed because of x”). Failure is often caused by a number of reasons.  And then by allowing ourselves spaces for experimentation after failure…that is how we finally find success. Confucius said, “Our greatest glory is not in never failing, but in rising every time we fail.” So the next time you fail at something, be grateful that things didn’t go quite right, that you’ll have the chance to learn and to grow, And then launch yourself like a rocket back towards your dream or desire.