There is no definitive answer to this question as it varies from family to family and country to country. In the United States, for example, the age at which a child can be legally spanked varies from state to state, with some states setting the minimum age at 2 years old and others at 18 years old. In general, however, it is generally accepted that spanking a child under the age of 5 is not advisable, as their brains are still developing and they may not yet understand why they are being punished. Additionally, physical punishment has been shown to be ineffective in disciplining children and can actually lead to more behavioral problems down the road. If you are considering spanking your child, it is important to speak with your pediatrician or another trusted medical professional first to ensure that it is an appropriate form of discipline for your child's age and personality.