Done with period?

When exactly are you done with your period? When you see brown is that consider your period is done or no?