Code:
([ceiling(w / 16) * 16] * [ceiling(h / 16) * 16])
->
(((width+15)&~15) * ((height+15)&~15))
though it's not readable to most non-programmers, the above style is how x264 does it in a number of places.
simplicity-wise, what LoRd_MuldeR has would be easiest to read and understand for most people though.