Contador's chances of winning the Tour were already effectively over before Saturday's 20th stage from Annecy to Annecy-Semnoz, but he lost his grip on second place in the general classification after coming in seventh on the day, 2min 28sec behind winner Nairo Quintana.
As a result, he is now fourth overall, with no realistic prospect of that changing in Sunday's final stage to Paris.
The 30-year-old's Tour started badly when he fell during the opening stage in Corsica and he has never really looked capable of competing with Chris Froome in the race for the yellow jersey.
He admitted that he has been affected by a knee problem and will now rest rather than defend his title in the Tour of Spain.
"I am tired physically and mentally. I need to have my knee looked at," he said.
On almost certainly missing out on a podium place at the Tour de France, Contador said: "Defending second place is not the same as defending the yellow jersey.
"It is always better to finish second than 10th, but the objective was to finish first. This year it was impossible, there is one rider who is better than the rest."