Heather Mills, 40, will receive 24.3 million pounds, of which 16 million will be in cash. The sum represents about 6% of McCartney's wealth, which the judge put at around 400 million pounds ($800 mln).
Speaking to reporters outside the High Court, the charity campaigner and former model said: "I'm so happy."
However, she said she would appeal against the publication of the court judgment "because it has so many private details about me and my daughter."
The couple were together for only four years after their 2002 marriage, and have a four-year-old daughter, Beatrice. McCartney, 60, had filed for divorce accusing his wife of "unreasonable behavior."
Mills had repeatedly complained of media hounding since the separation, and said last year she had been "treated worse than a murderer or a pedophile."
British tabloids have focused on her colorful past, accusing her of being a former porn star. Although she featured in a German sex guide entitled Die Freuden Der Liebe (The Joys of Love) published 20 years ago, her lawyers insist the images of her simulating sex acts are not pornographic.
After a motorbike accident in 1993, Mills had her left leg amputated below the knee.
The size of the divorce settlement was roughly the sum anticipated by legal experts, even though Mills had requested several times more. The payout reflects the short duration of the marriage and the fact that McCartney earned most of his wealth before the marriage, but also takes into account provision for their child.
McCartney's first wife Linda, a photographer and animal rights activist, died of breast cancer in 1998. McCartney has four children from his first marriage.