There are different regulations in each state as to when compulsory school attendance ends or when a pupil can be released prematurely from compulsory education upon application by the school board.
In Rheinland-Pfalz, full-time compulsory education lasts altogether twelve school years. All school-aged pupils attend primary and lower secondary education for at least nine years. After secondary education I, compulsory education has to be completed for further three years at upper secondary level by attending a general or vocational school.