In the past, I've made it easy on myself by spacing the buttons an inch apart. So, for a hat with a 22-in./56 cm circumference, 22 buttons. Easy.
But, for this hat, the buttons are bigger and I only have 18 of them.
So I divided the circumference by the number of buttons and came up with spacing of 1 1/3 in.
From a prior experience that wasn't a happy one, I knew that I needed to mark each button location before sewing all the buttons on. It was a hard-earned lesson, akin to "Measure twice, cut once."