This paper reports two empirical studies on how the use of different contract types affects, directly and indirectly, the outcomes of software projects. The first study evaluates the effect of contract type on project failure using information from a large international dataset of small-scale, outsourced software projects and tasks. The second study proposes and tests how the use of contracts is connected with project outcome using information about Norwegian software projects with a public client. Both studies find that the use of fixed price contracts is connected with a higher risk of project failure compared to time and materials types of contracts. The results from the second study suggest that different project outcomes with different contract types is explained by differences in how the provider is selected, how the client is involved in the project, the use of agile practices and the use of benefit management during project execution.