For Pakistan, opener Fakhar Zaman (138) stayed in the hunt before a target of 19 off the last over, but got bowled by Chris Woakes as Pakistan finished on 361 for seven.
Buttler, who recently became father of a newborn baby, made a 'rocking the baby' gesture to celebrate bringing up a century. It was the second fastest century by English batsman in One-Day-Internationals.
Together with England captain Eoin Morgan (71 not out) he shared an unbroken partnership of 162.
It was an encouraging display by the World Cup hosts just a few weeks from the start of the tournament and further proof of their progress as an ODI side.
Saturday's total was the 35th time since their miserable first-round exit at the 2015 World Cup that England, now top of the ODI rankings, had posted a total in excess of 300 -- a feat they had achieved only 34 times in total prior to that tournament.
A Pakistan attack missing the ill Mohammad Amir took a pounding, with Hasan conceding 81 runs from his maximum 10 overs and Afridi 80.