"They may take in partners. Some of those partners come in when the horses are racing," he said. "They do that with the idea that if this is going to be a potential stallion, I'm going to get in and buy in before his career is over and maybe I'll pay a little less than I would if this horse goes on and becomes a superstar, and then I'm going to have to pay maybe three or four times that amount to try and get in on the horse."

Eric Mitchell, Bloodstock editor at BloodHorse , says if a stallion is doing well and has the potential to get bigger and better, then some owners want to retain the bigger share.

It used to be common for top-end racehorses to get sold in retirement, but today, many owners are hanging onto horses with the idea that a bigger pay day may be coming down the road through stud fees.

Fast forward a few years, when the winner's racing career is over and the horse is "retired to stud." It could be a dreamy scenario for some: The horses earn a ton of money just for having the mares line up to have a little bit of (not-so) private time with them.

It's Triple Crown season, when the Belmont Stakes, the Preakness and the most prestigious of all, the Kentucky Derby , take the spotlight . Owners' wallets get fat and the horses become media darlings for a while.

It's a timely and potentially risky investment. The only thing that matters to guarantee a stud fee though, is that he can produce a foal that can stand and can nurse.

It's at least a 3½-year investment before knowing if you've got a potential star. After breeding and pregnancy, the foal has to be at least 2½ years old before it could get started on a racetrack.

There's also the risk, even with the perfect pedigree, that the animals could get sick or injured.

In a stallion's first years at stud, the fee starts on the lower end. It typically takes about five years to prove he can produce top class runners and consistent winners.

More than 20,000 foals are born in the United States and Canada every year. After the birth, owners must decide whether to sell the offspring or keep them for racing.

Some breeders will sell them as weanlings in the fall. Weanlings are usually 6 months to a year old.

"A lot of people will wait for the yearling sale when you can usually command a little more for a well-bred horse and a well-conformed horse and then some people will wait until horses are 2 years old," Mitchell said.

About 40 percent of the foals are sold as yearlings — horses ages 1 to 2 years old. Last year, the average price of a yearling was about $75,000, according to Mitchell.

For those that don't go to the auction market, they're owned by the people who bred them, and they'll go on and race their own stock or they may be sold privately.

Northern Dancer was one of the dominant sires in American pedigrees and was responsible for a boon in the breeding business in the 1980s. "He had more than 22 percent stakes winners from his foals," Mitchell said. "Typically if a stallion has 10 percent stakes winners, that is considered very successful, and his was over 22 percent." His stud fees were commanding more than $1 million.

Today, Tapit is the most expensive thoroughbred stallion stud in the United States and Canada. He was the leading North American sire for three consecutive years and set progeny records from 2014 -2016, according to BloodHorse. His breeding fee is $300,000 and he breeds about 125 mares a year.

Mitchell said Tapit is a proven commodity, so a mare's owner doesn't mind paying the stud fees knowing that the foals he produces will likely be bought for a sizable sum. In 2017, his yearlings sold for more than $791,000 on average.

Tapit himself was bought as a yearling for the hefty price of $625,000 in 2002. That's because he comes from a fashionable pedigree, including his sire Pulpit, and relatives Tap Your Heels and Ruby Slippers. His parents were champion thoroughbred racehorses.

Tapit had a successful racing career, coming in ninth in the 2004 Kentucky Derby, earning $557,300 overall.

Today, Tapit stands at Gainesway in Lexington, Kentucky. Through the 2018 breeding season, he will have generated about $167.8 million during his breeding career.

Breeding horses can be expensive and risky, but if all goes well, the breeder can be rolling in the dough.