I would just add to what Elvis said about the days from agreement to close that it depends on where you are buying. In my area, municipalities often require a dye test before they will start to process lien letters and tax certifications. In addition to that, those folks often only work 3 days a week, so that process can take up to 2 weeks, or more if there is a dye test violation. The settlement company will also need adequate time to perform a title search and if there are title problems to resolve, that adds time.
To be safe, I would cautiously plan on 3 weeks, but it could be less if everything goes smoothly.