By optimizing its outsourcing strategy, a company faces the opportunity to lower the overall costs of its IT project portfolio. Without considering risk and diversification effects appropriately, companies make wrong decisions about how much of a project is reasonable to outsource. In this paper, we elaborate a model to identify a project’s optimal degree of outsourcing at a fixed price, considering both, costs and risks of software development, as well as diversification effects. We also examine optimal outsourcing degrees in an IT portfolio context. To date, it is common practice to decide on the implementation of projects first and then decide on outsourcing. We provide a model that enables companies to determine an optimal outsourcing strategy which minimizes the total risk adjusted costs of an IT project portfolio by considering the portfolio decision and the selection of outsourcing degrees simultaneously. This model is then evaluated by simulation using real-world data.