The costs are all detailed in this link:
http://www.travel.state.gov/passport.../fees_837.html
When I was living in Austria, I had a friend form the US coming to visit. He applied for a renewal 6 months before his trip and still had not gotten his new passport within a week of his flight. He ended up contacting his Congressman to get it in time. Use those channels if you have to in order to get it in time.