I like the APE technique: Assess Product, then Evaluate Resources. Lay out a list of product features, evaluate what resources you have to build your product, and then estimate how much time you'll be able to get it done in.
A general rule of thumb: tell your employer/supervisor that you'll need slightly longer than you think you actually will, and tell those who work under you that they need to get it done slightly faster than you think they actually can.