An end cap for a brushless motor that dissipates heat from a controller and switching elements of the motor through fins in the end cap. The end cap can be directly or thermally coupled to the controller and switching elements to dissipate heat out through the fins.