This paper assesses the effect of international differences in taxes on the choice of patent location by multinational enterprises (MNEs). The analysis is based on a large sample of patents and firms from the OECD-PATSTAT and OECD-ORBIS databases over 2004-10. The approach is to compare the number of patent applications of MNE entities with different links to other countries and thus different sets of location choices, while controlling for other factors affecting patenting behaviour. The results suggest that lower corporate taxes, either in the form of a lower statutory rate or a preferential intellectual property regime, are associated with more patent applications. Both the location of research activities, which is proxied by the location of patent inventors, and the legal ownership of patents are found to be sensitive to corporate taxes. For instance, a 5 percentage point cut in the preferential tax rate on patent income is associated with a 6% increase in patent applications. On average, about two-thirds of the increase comes from patents invented at home and one third from patents invented abroad, but the relative importance of these two effects is likely to vary with the design of the preferential regime and especially the existence of activity requirements. In addition, strong anti-avoidance measures against tax planning are found to reduce patent shifting by MNEs.