Spain's taxman and Ronaldo's advisors made the deal to settle claims the 33-year-old, who has since moved to Italy's Juventus, hid income generated from image rights while he was playing for Real Madrid.
The agreement also includes a two-year jail sentence which he won't serve. Sentences of up to two years are generally not enforced in Spain for first-time offenders in non-violent crimes.
According to El Mundo, who had access to documents of the settlement, tax authorities realised he paid two million euros too much last year for image rights he sold in 2014.
That means he only has to pay 16.7 million euros, the report said.
It added that Ronaldo has already paid 13.4 million euros.
Spain's finance ministry would not comment on the report.
The newspaper said the tax agreement also means that the court near Madrid investigating the case had dropped charges against Ronaldo's agent Jorge Mendes.
The court was not immediately available for comment.
Had the case gone further, without the player offering a settlement, Ronaldo could have faced a reported fine of 28 millions euros and a three-and-a-half-year jail term, according to the Spanish tax office union Gestha.
Ronaldo's big rival, Barcelona's Argentinian star Lionel Messi, paid a two-million-euro fine in 2016 in his own tax wrangle and received a 21-month jail term.
The prison sentence was later reduced to a further fine of 252,000 euros equivalent to 400 euros a day of the original term.