They obviously had the right people available at the end.
Weems nailed a 3-pointer over the outstretched arms of reigning NBA Defensive Player of the Year Dwight Howard to break a 103-all tie with 7.1 seconds left.
Calderon then stole the ensuing inbounds pass and hit both free throws to give the Raptors enough breathing room to overcome the eighth 3-pointer of the game from Magic forward Mickael Pietrus with a second to play.
DeRozan, who had 26 points, 11 in the fourth quarter, finished out the scoring by making two free throws with 0.7 seconds remaining.
"It takes a lot to beat a good team in their building and I thought all of our guys were really good tonight," Toronto coach Jay Triano said. "Everybody gave us everything they had. They used all their fouls, shared the ball, made shots it was really good."
It was a surprising performance for the Raptors, who were on a six-game losing streak and had three key players (starting power forward Linas Kleiza, and top subs Leandro Barbosa and David Andersen) out with injuries. On top of that, starting forward Reggie Evans decided to play in the game, despite a sore hip and contributed 12 rebounds.
Weems stepped in and scored 14 points in his first start of the season. Calderon had 10 points and seven assists. Andrea Bargnani led the Raptors with 27 points, but had only two points on 1-of-6 shooting in the fourth quarter.
"I think we put everything together, played a full 48 minutes tonight," DeRozan said. "We want to prove how good we really are and our record doesn't show it, but when you go out and prove it, it's a whole other story."
Orlando lost at home for the second straight game and allowed the opponent to shoot 50 percent from the field in both games. The Magic had trouble chasing Toronto's perimeter players all night, a fact the Raptors exploited when Howard had to come all the way from inside the free-throw line to contest Weems' game-winning shot.
"It looks like we can't run the plays defensively, like people are just too quick for us," said Magic coach Stan Van Gundy. "We get beat off the dribble ... and beat off the dribble ... our defense is really disturbing."
The loss ruined a great performance by Pietrus, who hit eight of 11 shots, all 3-pointers, in his first action in three games, but also made a glaring mistake in the final seconds. After Weems' 3-pointer put Toronto ahead 106-103, Pietrus threw away the ensuing inbounds pass to Calderon to seal the loss.
He did hit his final 3-pointer with a second left to cut the deficit to 108-106, but DeRozan sealed it with two free throws at the other end and time expired.
Howard led the Magic with 25 points and eight rebounds. Pietrus had 24 and Jameer Nelson added 23 points and eight assists.
Calderon started the fourth quarter with a 3-pointer that gave Toronto a 92-82 lead, the first double-digit lead of the game for either team. DeRozan's 18-footer with 9:19 left put the Raptors up 96-86, but their offense stalled there and opened the door for the Magic.
Pietrus hit his sixth 3-pointer with 2:25 to play to cut the deficit to 100-98. Pietrus hit another with 28 seconds to play that tied it at 103, but then committed the crucial turnover while trying to inbound the ball with 7.1 seconds to go.
Bargnani scored 21 points and Howard had 15 in a first half that was evenly contested. Both teams held four-point leads in the first five minutes of the game, but that was the biggest advantage either side held in the first two periods.
There were 25 lead changes and 12 ties as Bargnani and Howard waged an outside vs. inside competition. Bargnani hit 9-of-12 shots, mostly from the perimeter as the Magic had a hard time matching up.
Howard hit 7 of 12, all from inside the lane and the Raptors were having just as much trouble trying to contain him. He got help from Pietrus, who hit four 3-pointers in his first action in three games.
Things didn't change until the last two minutes of the third quarter, when Calderon and Julian Wright sandwiched 3-pointers around a dunk by Amir Johnson to give Toronto an 85-77 lead. It was 89-82 entering the fourth.
Bargnani has scored in double figures in all nine games, but has yet to have a double-figure rebounding game. ... Magic G J.J. Redick is 0 for 11 on 3-point attempts his last four games. ... The Magic lost for the first time this season when scoring 100 points.