The maximum height of a retaining wall can depend on various factors, including local building codes, the type of soil, and the proximity to other structures. It's best to consult with a professional contractor or local council for specific guidelines.