elementary = 6 years
Jr. High (middle school) = 3 years
High School = 3 years
the title sensei is used in almost any type of teaching situation. Be it at school, kendo class, flower arrangement class, or even a widely know manga artist or famous writer, and Doctors.
So since I answer so many questions here and in essence also teach high school. According to Japanese customs you all should be calling me Moyashi-Sensei.
lol... I'm joking but it would b e done in Japan.
It's pretty funny to see teachers calling others .... Hi Carsten-Sensei (very few teachers at school know my family name so they break the rule and tagged sensei to my name) and I'd say Hi Tanaka-Sensei. Or a bit more, Kadowaki-Sensei are you busy right now? Oh Carsten-sensei! What's up?
It's pretty anal if you ask me but, some of the teachers I work with I respect so much that it's hard even to call them by their first names.
Almost forgot. In class, normally when you call the teacher you'd say Mrs. Brown! Mrs. Brown! What does XXX mean? In Japan, if you're somewhat familiar with a teacher you can drop their last name and just call that person "Sensei" = "Teacher". But the catch here is that if it's a teacher you don't know (as in not having been taught by) you normally don't say just "Sensei" however if you forgot their name or just don't know it, "Sensei" know sort of means "Teacher (uncle)" = "Sir".
hope this helps