They each won titles in straight sets at the BNP Paribas Open on Sunday and earned matching $1 million paychecks, the richest in tournament history.
Federer defeated John Isner 7-6 (7), 6-3 for his record fourth title at Indian Wells, avenging a loss to the American who beat him in Davis Cup play.
Azarenka routed Maria Sharapova 6-2, 6-3 in the WTA Tour's first final between the No. 1 and No. 2 players since 2008.
Federer improved to 39-2 since last year's U.S. Open, with his only losses to No. 2 Rafael Nadal in the semifinals of the Australian Open and the 11th-ranked Isner, who won on the Swiss star's home turf last month.
NGUYEN:Federer, Azarenka keep streaks alive at Indian Wells
"This year I decided I wanted to play a bit more,'' Federer said. "If things went great, I knew I could be on a great run coming into Indian Wells and Miami. That's exactly what happened. I'm a bit surprised it's all gone that well.''
Azarenka improved to 23-0 this year, the best start to a season since Martina Hingis went 37-0 to open 1997. The top-ranked Belarusian won her Tour-leading fourth title of the year.
Federer, ranked third, avenged his two defeats in consecutive days at Indian Wells, putting away Nadal in the rain-delayed semifinals Saturday and then Isner in a final delayed 12 minutes in the first set by rain drops. He battled a cold most of the two-week tournament, and felt especially sick during the first three days.
GALLERY: 2012 ATP champs | WTA winners
"I was able to come through and so convincingly at the end is amazing,'' he said. "I've really played amazing these last three matches in particular. I couldn't be more happy. They were really great wins.''
Federer's victory tied him with Nadal for most ATP World Tour Masters 1000 career titles at 19, cheered on by friends that included musicians Gwen Stefani and her husband Gavin Rossdale, and Vogue editor in chief Anna Wintour. Federer won three straight titles here from 2004-06 and his fourth snapped a tie with Jimmy Connors and Michael Chang.
"What surprises me is that I've actually won this again after all this time,'' Federer said, "and particularly this year where I was struggling and hurting a lot at the beginning of the year.''
Isner had a breakthrough two weeks in the desert, beating top-ranked Novak Djokovic in the semifinals to reach his first Masters 1000 final. That assured him of entering the top 10 for the first time at No. 10 when the latest rankings come out Monday.
"I'm going to remember this one for a long time, so getting into the top 10 is nice,'' Isner said. "The hard thing now is staying inside of the top 10. That's what I've got to work on.''
The big-serving American actually had three fewer aces than Federer's seven, with his fastest serve clocked at 135 mph, slower than the 135-143 mph he was hitting against Djokovic.
"Thank God at times maybe he didn't hit the big one at 140 something down the T,'' Federer said.
Federer broke him on Isner's netted backhand volley to go up 4-3 in the second. He closed out the match on Isner's forehand that landed in the net.
"I served pretty well,'' Isner said. "I don't think I lost the match because I didn't serve as well. He was on top of me and his forehand was way too good.''
In the tiebreaker, Isner was serving at 7-all when Federer managed a backhand lob over his 6-foot-9 opponent and Isner let it go, with the ball landing on the baseline. Federer won that point and the next to take the set.
"A little bit unlucky there,'' said Isner, who later teamed with Sam Querrey in losing the doubles final 6-2, 7-6 (3) to Nadal and Marc Lopez. "I'm not complaining. I had a lot of things go my way this week.''
So did Azarenka.
She broke Sharapova six times, including the final game when the Russian double-faulted then shanked a forehand to set up Azarenka's first match point. She won after forcing Sharapova into a desperation defensive shot that sailed beyond the baseline. Azarenka dropped her racket, pumped her right arm and broke into a brief dance while smiling broadly.
"It's important to stay humble and to know that what I have been doing is working,'' Azarenka said. "Don't forget those little details, and being disciplined, professional off the court is as important as being determined and really hard working on the court.''
The women's final was a rematch of the Australian Open final, which Azarenka won 6-3, 6-0 in January to keep Sharapova from regaining the No. 1 ranking. This time, Sharapova was error-prone during the 1 1/2-hour match on an unusually cold, blustery day in the desert. The second-ranked Russian kept hitting close to the lines and missing.
"She's extremely solid and she makes you work for every point,'' Sharapova said. "Maybe she forces you to want to do a little bit more than either you should or would want to. I just made too many unforced errors at the wrong time and wasn't solid enough.''
It was yet another dominant performance by Azarenka, who improved to 5-3 against Sharapova, including 4-0 in finals. Sharapova hasn't beaten Azarenka in a completed match since 2009; she won last year in Rome when Azarenka retired in the second set with a right elbow injury.
"What was important for me was to try to put as much pressure on her, not to really let her into the match because when she has a little window open she always going to take the opportunity and she's going to fight no matter what the score is,'' Azarenka said.
Sharapova twice had aces to hold serve in the first set, but her groundstrokes were inconsistent. Azarenka led 4-1 in the second set when Sharapova won two straight games to get to 4-3, capped by a swinging forehand volley winner. But Sharapova won just two points in the final two games to fall to 13-3 on the year.
"I still don't think I was as aggressive as I should be,'' Sharapova said. "But it's OK. We're going to play against each other a few more times, so I'll have time to change that.''