Get device header height

I need to get the height of the header, and since I’ve noticed that on each platform and device it differs. What is the best way to achieve this?