The deal carries an average annual value of $5.8 million.
Mangiapane, 26, is coming off a career year in which he scored 35 goals and 55 points while playing in all 82 games. He added six more points in 12 playoff games.
Earlier Tuesday, the Flames also avoided arbitration with defenceman Oliver Kylington by agreeing on a two-year contract. Forward Adam Ruzicka is now Calgary's only remaining unsigned restricted free agent.