How long it takes depends on where you are and how urgently you need to travel.
In the U.S., typical processing times are four to six weeks for routine service and two to three weeks for expedited service. Those timelines do not include mailing time, and the U.S. Department of State says mailing can add up to two weeks on the front end and up to two weeks on the return end.
If you have urgent international travel in 14 calendar days or less, you may be able to get an appointment at a passport agency or center, though appointments are not guaranteed.
Abroad, replacement timing depends on the embassy or consulate, the documents you have available and how soon you need to travel. In urgent cases, consular staff can explain whether an emergency passport is possible.