The height of a retaining wall can vary based on local building codes, soil conditions, and engineering requirements. For walls higher than 4 feet, it is often necessary to have a professional engineer design the wall to ensure stability and safety.