Attention-loving pharmaceutical billionaire Stewart Rahr has agreed to pay Carol, his wife of 43 years, a whopping divorce settlement of $250 million.

The orange-tinted, Ray-Ban-wearing, self-styled Stewie Rah Rah, “King of All Fun,” has just reached a settlement with Carol, who stood by him for years through his high-profile party antics.

Sources tell us that, as part of the divorce deal, Stewart, 67, will keep their $45 million Hamptons home — where he has thrown lavish charity bashes attended by the likes of Bill Clinton, Alicia Keys, Michael Milken, Mark Wahlberg and David Koch — while Carol gets their $30 million Trump Park Avenue apartment.

But a source tells us that Rahr has yet to move out of the New York apartment, and Carol has moved into the Mark Hotel.

The flamboyant, party-loving playboy, who sold his pharmaceutical business Kinray in 2010 for $1.3 billion, never had a prenuptial agreement with Carol, who stayed at his side as he built his company from scratch.

She served him with divorce papers last December, right outside their apartment, and hired pit-bull attorney Robert Stephan Cohen. Rahr responded with a crack team of Ben Brafman and David Aronson, whose firm repped Katie Holmes in her divorce from Tom Cruise.

Rahr has been busy giving much of his money away to charity. A source told us at the time of the divorce filing, “Carol fears Stewart is so out of control he could give away all his money, half of which is hers.” While the settlement is within the top 10 most expensive divorces in legal history, it still leaves Rahr on the billionaires’ list.

Brafman said last night, “I cannot comment on the specific terms of the settlement, as there is a confidentiality clause . . . both sides believed the settlement to be fair . . . Stewart and Carol remain good friends and continue to share an amicable relationship.”

Cohen would only say, “The information is not accurate.” Aronson didn’t respond.