Do I need a building permt to replace windows?

If you are replacing 50% of the windows in the home a permit is needed.