In this paper we show that in a two sector economy with heterogeneous agents and competitive markets, in a steady state the optimal capital income tax rate is in general different from zero. The optimal tax policy in this setting depends on the relative price difference. In a two sector economy capital and labour margins are interdependent, which is why a difference between investment good’s price and consumption good’s price allows the government to tax capital income in one sector and undo the tax distortion by differential labour income taxation. This policy serves efficiency purpose as it restores production efficiency. For instance, if investment goods are more expensive than consumption goods, it is optimal to tax capital income in consumption sector, and set zero capital income tax and lower labour income tax in investment sector. This policy discourages work and investment in consumption sector, and encourages agents to shift capital and working time to investment sector. This increases production in investment sector and restores production efficiency. In a model with two classes of agents, we show that this policy can also serve redistributive purpose.