This all depends on the style you are going for and the position you want the bun. The easiest answer is as long as it needs to be to all go up into the hair tie and leaving a little bit of excess to create the bun. Some like to have an undercut with the bun, so all of the back and side shaved and long on top and some like the edges trimmed and some like it all long.