We define Schwartz functions, tempered functions, and tempered distributions on (possibly singular) real algebraic varieties. We prove that all classical properties of these spaces, defined previously on affine spaces and on Nash manifolds, also hold in the case of affine real algebraic varieties, and give partial results for the non-affine case.