Los Angeles Superior Court Judge Charlaine F Olmedo handed down the sentence to the 47-year-old Masterson on Thursday (early Friday AEST) after hearing statements from the women about the trauma they experienced and the suffering caused by the disturbing memories in the years since.
The actor, who has been in custody since May, sat in court wearing a suit. Masterson watched the women without visible reaction as they spoke.
"When you raped me, you stole from me," said one woman who Masterson was convicted of raping in 2003.
"That's what rape is, a theft of the spirit."
"You are pathetic, disturbed and completely violent," she said.
"The world is better off with you in prison."
The other woman Masterson was found guilty of raping said he "has not shown an ounce of remorse for the pain he caused".
"I knew he belonged behind bars for the safety of all the women he came into contact with. I am so sorry, and I'm so upset. I wish I'd reported him sooner to the police," she told the judge.
After an initial jury failed to reach verdicts on three counts of rape in December and a mistrial was declared, prosecutors retried Masterson on all three counts earlier this year.
This time, a jury of seven women and five men found Masterson guilty of two counts on May 31 after seven days of deliberations. Both attacks took place in Masterson's Hollywood-area home in 2003, when he was at the height of his fame on the Fox network sitcom That '70s Show.
They could not reach a verdict on the third count, an allegation that Masterson also raped a longtime girlfriend. They had voted 8-4 in favour of conviction.
The judge sentenced the actor after rejecting a defence motion for a new trial that was argued earlier Thursday. The defence sought to have sentences for the two convictions run simultaneously, and asked for a sentence of 15 years to life. The prosecution asked for the full 30 years to life sentence Masterson was eligible for.
"It's his life that will be impacted by what you decide today," Masterson's lawyer Shawn Holley told the judge before the sentencing.
"And the life of his nine-year-old daughter, who means the world to him, and to whom he means the world."
"He has lived an exemplary life, he has been an extraordinary father, husband, brother, son, co-worker and community servant," Holley said.
Prosecutors alleged that Masterson used his prominence in the Church of Scientology — where all three women were also members at the time — to avoid consequences for decades after the attacks.
The women blamed the church for their hesitancy in going to police about Masterson. They testified that when they reported him to Scientology officials, they were told they were not raped, were put through ethics programs themselves, and were warned against going to law enforcement to report a member of such high standing.
The church said in a statement after the verdict that the "testimony and descriptions of Scientology beliefs" during the trial were "uniformly false."
"The Church has no policy prohibiting or discouraging members from reporting criminal conduct of anyone — Scientologists or not — to law enforcement," the statement said.
Masterson did not testify, and his lawyers called no witnesses. The defence argued that the acts were consensual, and attempted to discredit the women's stories by highlighting changes and inconsistencies over time, which they said showed signs of coordination between them.
The women whose testimony led to Masterson's conviction said that in 2003, he gave them drinks and that they then became woozy or passed out before he violently raped them.
Olmedo allowed prosecutors and accusers to say directly in the second trial that Masterson drugged the women, while only allowing the women to describe their condition in the first.
Masterson was not charged with any counts of drugging, and there was no toxicology evidence to back up the assertion. The issue could be a factor in a planned appeal from the defence of Masterson's conviction.
The Associated Press does not typically name people who say they've been sexually abused.
Masterson starred with Ashton Kutcher, Mila Kunis and Topher Grace in That '70s Show from 1998 until 2006.
He had reunited with Kutcher on the 2016 Netflix comedy The Ranch, but was written off the show when a Los Angeles Police Department investigation was revealed the following year.
While that investigation began before a wave of women shook Hollywood with stories about Harvey Weinstein in October 2017, the conviction and sentencing of Masterson still represents a major #MeToo-era success for Los Angeles prosecutors, along with the conviction of Weinstein himself last year.