Personalized cancer medicine is based on the concept that targeted therapies are effective on subsets of patients whose tumors carry specific molecular alterations. Several mammalian target of rapamycin (mTOR) inhibitors are in preclinical or clinical trials for cancers, but the molecular basis of sensitivity or resistance to these inhibitors among patients is largely unknown. Here we have identified oncogenic variants of phosphoinositide-3-kinase, catalytic, alpha polypeptide (PIK3CA) and KRAS as determinants of response to the mTOR inhibitor everolimus. Human cancer cells carrying alterations in the PI3K pathway were responsive to everolimus, both in vitro and in vivo, except when KRAS mutations occurred concomitantly or were exogenously introduced. In human cancer cells with mutations in both PIK3CA and KRAS, genetic ablation of mutant KRAS reinstated response to the drug. Consistent with these data, PIK3CA mutant cells, but not KRAS mutant cells, displayed everolimus-sensitive translation. Importantly, in a cohort of metastatic cancer patients, the presence of oncogenic KRAS mutations was associated with lack of benefit after everolimus therapy. Thus, our results demonstrate that alterations in the KRAS and PIK3CA genes may represent biomarkers to optimize treatment of patients with mTOR inhibitors.