Arezzo railway station: This is the useful rail gateway, not Florence. Take the TFT regional train on the Arezzo–Sansepolcro line to Sansepolcro (roughly 1 hr 10 min; about €5–8), or the direct Autolinee Toscane bus when its timetable is better for your arrival. Allow 1 hr 15 min door-to-door to the historic centre. Check the day’s timetable: frequency is modest and some connections are bus substitutions.
Sansepolcro railway station: The station is on the eastern edge of town, about a 15–20-minute walk from Piazza Torre di Berta and the historic core. It is useful from Arezzo; it is not a fast, high-frequency national-rail hub. Use it if your lodging is central and you are travelling light, otherwise arrange a pickup.
Florence Airport (Peretola): For public transport, take tram T2 to Firenze Santa Maria Novella (about 20 minutes), train to Arezzo (roughly 40–70 minutes), then the TFT train or bus to Sansepolcro (about 1 hr 10 min). Budget around 3 hours and €15–30, assuming a clean connection. A rental car is quicker—about 1 hr 45 min—but only makes sense if you are continuing through the Valtiberina or countryside; do not take it into the walled centre.
Perugia San Francesco d’Assisi Airport: It is geographically closer than Florence but has limited flights and poor onward public transport. Rent a car for the roughly 1 hr 15–30 min drive; a private transfer is sensible only for a group and will cost far more than public transport. Do not choose PEG expecting a simple airport bus to Sansepolcro.
Bologna Guglielmo Marconi Airport: Use Bologna only if the flight is substantially better. By rail it means reaching Bologna Centrale, travelling via Florence to Arezzo, then continuing to Sansepolcro: realistically 4–5 hours and roughly €35–65. A rental car takes about 2 hr 30 min before traffic and is the more practical option for a wider Tuscan/Montefeltro road trip.