There's no single answer to the earliest age someone can legally drop out of school. It varies significantly by country, state/province, and sometimes even individual circumstances (like being emancipated). In many places, compulsory education laws mandate school attendance until a certain age (often 16 or 17), meaning dropping out before that age is illegal without specific exceptions. Even after reaching the compulsory age, there may be restrictions or requirements to leave school.
To find the specific answer for a particular location, you'd need to research the laws of that jurisdiction.