Brazil, like other natural resource-exporting countries, has benefited from a sharp increase in commodity prices over the last few years. To investigate the possible impact of terms-of-trade gains on the real economy, this paper estimates normalised quadratic input demand and output supply functions for the Brazilian economy during 1997-2008. Technological change is modelled in a flexible manner through the inclusion of quadratic splines in the profit function. The paper contributes to the literature by using nonlinear seemingly unrelated regression techniques to estimate the input demand and output supply functions and by disaggregating exports and imports into capital, consumption and intermediate goods. Improvements in the terms of trade due to rising export prices and/or falling import prices are associated with hikes in export volumes on the back of rising import demand and some labour shedding in the sectors using imported capital goods. The direct impact of terms-of-trade changes on domestic consumption and investment is comparatively modest, possibly due to the fact that the Brazilian economy remains relatively closed to trade.