This paper presents a method for determining the optimal timing and economic feasibility of a new railway linking North and South Brazil, connecting the existing southern transportation systems to the vast agricultural and mineral wealth of the North-Central region. Possible new railway links, together with the existing road, rail and water transport system are modeled as a network. Shippers route their traffic over the network to minimize their cost, and the railway investor selects the sequence and timing of new links (if any) that maximize the present value of benefits to the investor. The problem can be formulated as a large mixed integer programming problem. However, in this paper we show that the problem can be formulated as nested dynamic programming models that can be easily implemented in a spreadsheet. The traffic assignment problem is implemented as a recursive model that is used to calculate the benefits for each possible system state. A second dynamic programming problem calculates the optimal expansion path for the system. The advantage of implementing these models in a spreadsheet is that optimal solutions are automatically recalculated if any of the data is changed. We show how this feature greatly simplifies sensitivity analysis.