In the study of the stoichiometric relationship between autotrophs and herbivores, attention has been largely focused on effects of the encountered mismatch between needs and supplies of an element on herbivore growth and ecosystem processes. Herbivore adaptation to poor food quality has rarely been investigated. This study presents a predictive model of feeding, assimilation, digestion and excretion of Daphnia facing a dietary deficiency in phosphorus. Biochemical compounds in the food were divided into phosphorous and non-phosphorus compounds. It was assumed that Daphnia is able to differently assimilate both types of compounds by regulation of target specific digestive enzymes. Feeding rate was regulated by optimal gut residence time of food particles, and assimilation efficiency by gut residence time and optimal secretion of both classes of gut enzymes. The model predicted the optimal strategy for a consumer facing an elementally imbalanced diet: (1) increase the ingestion rate, and (2) increase the secretion rate of both classes of gut enzymes. It resulted in decreased C and nutrient assimilation efficiencies, increased C feeding costs, and reduced growth rate. Sensitivity analysis showed that these predictions were qualitatively not influenced by parameter values. An alternative model was tested that includes an additive term allowing the direct excretion of C assimilated in excess. Results showed that this strategy is not optimal for the consumer growth rate. In conclusion, the model supports the hypothesis that carbon ingested in excess may generate energy that can be used to obtain more nutrients by increased feeding rate.