Two years, on and off but mostly on. Junior year of high school through freshman year of college. Ended because neither of us really wanted to do the long distance thing, we got bored of each other and the spark just wasn't there anymore.
One year -- freshman-sophomore year of high school. Ended because we were really young and didn't know what the hell we were doing.

He's still one of my best friends, though.
One year -- sophomore-junior year of college. Ended because I was severely depressed and we were going to take some time off so I could deal with my issues, and then he ended up hooking up with another girl two days after the start of our "break," dating her three weeks after, and sleeping with her less than a month after. He broke up with her as soon as he realized that by "taking a break" I had actually meant "take a break" and not "break up" (apparently he is either a huge idiot or I am a horrible communicator, but I am leaning towards the former), and though he spent the next few weeks insisting that I was The One and that she would never compare to me, it kind of made a reconciliation unlikely.