The search for Mr. or Mrs. Right can be complicated, often involving a lot of dating, breakups, makeups, and even more breakups. Many of us may roll our eyes, raise our eyebrows, or simply sigh in disbelief when married couples say, “You just know when you find the one.” But what about those of us who aren’t as intuitive when it comes to love? Luckily, there’s a simple (and fun) mathematical formula known as the famous Secretary Problem, originally introduced by American mathematician Merrill M. Flood, to help us pick the perfect spouse by the time we’re 40.

"Should you marry your current girlfriend, or move on in hopes of finding someone better?" asks Sara Silverstein, researcher and narrator of the Business Insider video, “Here’s The Math Formula to Pick the Perfect Spouse.” Silverstein suggests statistics can actually help you optimize your chances of marrying the best person for you. If you’re 20 and want to settle by the time you’re 40, these three dating strategies can help reveal how close you are to marrying “the one” based on the choices you make.

Dating strategy #1
Sara Silverstein suggests your chances of marrying the perfect spouse by age 30 is 2.5 percent. Business Insider

If you marry the person you’re dating by the time you turn 30, your chances of marrying the perfect spouse is one out of 40, or 2.5 percent.

Dating Strategy #2
Silverstein advises to not marry the first girlfriend, but marry the one better than her, to increase your chances of the perfect spouse by 11 percent. Business Insider

Silverstein advises men to not marry their first girlfriend but to marry the next girl that they date. This strategy improves your chances of picking the perfect spouse by 11 percent.

Optimal strategy
The optimal strategy involves marrying the girl that is better than any of the first 15 you've dated. Business Insider

Last but not least, Silverstein notes “the optimal strategy.” It means dating and rating the first 15 girls you've dated, or until you're 27.5 years old — whichever comes first — and then marry a girl that is better than any of the first 15 you've dated. This increases your chances of marrying "the one" by 38 percent.

Secretary Problem
The Secretary Problem can help you pick the perfect spouse by age 40. Business insider

This is known as the Secretary Problem, where you reject the first and divide that by the number of candidates (n over e is about equal to 15, where n is equal to 40, and e is a mathematical concept of 2.718).

Chances of just settling for any spouse are drastically lower with this statistical approach, but it could also increase your chances of being age 40 and alone.

Happy calculating.

Click here to see the complete video.