The line-planning problem seeks to determine the set of fixed routes (or lines) a transit operator should run, along with associated operation frequencies. We propose an optimization algorithm for the transit-line-planning problem based on bi-level programming that exploits the problem’s structure in conjunction with the range estimation of demands. The issue of conservativeness due to the range estimation is mitigated by adopting the robust optimization approach. The model was inspired by a real-world application that leverages big data available from telecommunications operators to estimate city-wide mobility patterns. Demand estimates from such sources are based on large sample sizes (often orders of magnitude larger than those used in survey-based approaches), and capture day-to-day variability in travel demand as ranges. The validity of the proposed algorithm is demonstrated by using real-world data derived from 2.5 billion call data records from Abidjan, Côte d’Ivoire.