The toilet flange should sit on TOP of the FINISHED floor, so depending on the brand and type of flange you use, would depend on where the pipe needs to be. You can often just leave the pipe long and cut it off when the finished floor is in IF you ensure you have enough room to install the flange.