In Brazil the names changed quite a bit across the years. I believe that the current ones are
fundamental - 9 years (6yo to 14yo)
médio (middle) - 3 years (15yo to 17yo)
superior / universitário (universitarian) - typically 4~5 years, but it varies
The first two used to be called primeiro grau (first grade), segundo grau (second grade). And even further back, the primeiro grau was actually two, primário (primary - 4y, from 7yo to 10yo) and ginasial (gymnasial - 4y, from 11yo to 14yo).
In Brazil the names changed quite a bit across the years. I believe that the current ones are
The first two used to be called primeiro grau (first grade), segundo grau (second grade). And even further back, the primeiro grau was actually two, primário (primary - 4y, from 7yo to 10yo) and ginasial (gymnasial - 4y, from 11yo to 14yo).