Matt Henry’s five-wicket bag helped ensure the hosts took a 3-1 series win to go with their 2-0 Test domination last month.
New Zealand posted 294 for 5 batting first at the popular beachside resort venue with Guptill making 102, before Sri Lanka were all out for 258 with 17 balls remaining.
Sri Lanka captain Angelo Mathews, with a brave knock of 95, had set the scene for a cliff-hanger finish when he led his side to 223 for 5 before the tail folded in six overs for the addition of only 35 runs.
The last three wickets fell for six runs in the space of 10 deliveries.
Along with Mathews, Dinesh Chandimal and Milinda Siriwardana played their part in keeping Sri Lanka in with a chance for most of the their innings.
Mathews and Chandimal produced a 93-run stand for the fourth wicket before Trent Boult, making his first appearance in the series, dismissed Chandimal for 50.
After Thisara Perera (15) made a brief appearance at the crease Siriwardana and Mathews cracked 62 off 40 to have Sri Lanka at 223 for 5 with nine overs and five wickets to get the remaining 72 runs.
But when Siriwardana fell to Mitchell Santner for 39, New Zealand rammed home their advantage.
At the start of the day Guptill capped a remarkable home season with his 10th ODI century, reaching 102 in 109 deliveries to go with his 79, 93 not out, 30 and 27 earlier in the series.
When Mathews won the toss and put New Zealand into bat he had an immediate result with Tom Latham out in the first over without scoring.
But Guptill and Kane Williamson then established New Zealand’s dominance with 122 for the second wicket.
PTI