Anderson rallied from two sets to love and a match point down to produce one of the best comebacks of his career trumping the world number 2 and top seed Federer 2-6, 6-7, 7-5, 6-4 and 13-11 to book his spot in the semi-final.
Anderson in his turn says it was vital to believe in himself from the very beginning.
"I just kept on telling myself that I have to keep believing and I kept saying that today is going to be my day because you really need that mindset taking the court against someone like Rodger."
"As the match went on I just gave it my all and I'm obviously very ecstatic to have gotten through that," Anderson said moments after his triumph.
World number 8 Anderson now faces either John Isner in the Wimbledon semi-final on Friday after the latter beat Milos Rionic 7-6,6-7, 4-6 and 3-6.