The new contract ties Carrick, who has made 48 appearances for the club this season, to Old Trafford until at least June 2012.
Carrick was pleased to have completed the deal before Wednesday night's Champions League final against Chelsea.
"This is a fantastic club and it is a pleasure to be part of this great squad," the West Ham academy product told United's website.
"I believe this team will be together for many years to come and to win back-to-back titles in my first two seasons at the club is a dream come true."
Ferdinand, 29, signed a five-year deal in April which effectively means he and Brown, 28, could end their careers with the title holders.