Convert the entire header portion, including the '.', to a string first, so you can calculate the width including it.
>>> '{:<20} sum so far: {}.'.format('{}.'.format(9), 123)
'9. sum so far: 123.'
>>> '{:<20} sum so far: {}.'.format('{}.'.format(10), 123)
'10. sum so far: 123.'