The fear and hatred of others who are different has economic consequences because such feelings are likely to translate into discrimination in labor, credit, housing, and other markets. The implications range from earnings inequality to intergenerational mobility. Using German data from various years between 1996 and 2010, we analyze the determinants of racist and xenophobic feelings towards foreigners in general, and against specific groups such as Italians and Turks. We also analyze racist and anti-Semitic feelings towards German citizens who differ in ethnicity (Aussiedler from Eastern Europe) or in religion (German Jews). Individuals' perceived (or actual) economic well-being is negatively related to the strength of these feelings. Education, and having contact with foreigners mitigate racist, anti-Semitic and xenophobic feelings. People who live in states which had provided above-median support of the Nazi party in the 1928 elections have stronger anti-Semitic feelings today. The results are not gender-driven. They are not an artifact of economic conditions triggering feelings about job priority for German males, and they are not fully driven by fears about foreigners taking away jobs. The results of the paper are consistent with the model of Glaeser (2005) on hate, and with that of Akerlof and Kranton (2000, 2005) on identity in the utility function.