Rural areas dependent on agricultural income, are often among the poorest in developing countries. However, little distinction is generally made within the agricultural sector. This lack of distinction hinders targeting of agricultural investments towards poorer farmers. This paper illustrates, using a production function analysis with flexible marginal returns, how agricultural production activities and returns to agricultural production factors differ by poverty level in the case of Madagascar. The results show that access to primary education is relatively more beneficial for poorer agricultural households while additional secondary education has no effect on agricultural productivity. Returns to agricultural inputs are significantly higher for poorer agricultural households. Land inequality increases as land sales markets benefit the richer households and as the rich engage more in extensification while rental markets improve agricultural efficiency and may thus benefit poor and rich alike. Land titling has little effect on improved agricultural productivity. More formal land titling is therefore not sufficient to change the bad performance of agriculture of the last decades.