The team announced the deal Friday.
Buffalo's 2004 first-round draft pick is coming off a season in which he had 31 goals and 55 points — both career highs — in 62 games. He tied for third on the team in points.
Stafford's offensive punch played a key role in helping the Sabres overcome the loss of top centre Derek Roy to injury in December. The Sabres went 29-11-6 since Dec. 28 to finish seventh in the Eastern Conference.
In four-plus seasons, Stafford has 94 goals and 196 points in 317 career games.