We prove bounds for the volume of neighborhoods of algebraic sets, in the euclidean space or the sphere, in terms of the degree of the defining polynomials, the number of variables and the dimension of the algebraic set, without any smoothness assumption. This generalizes previous work of Lotz (Proc Am Math Soc 143(5):1875–1889, 2015) on smooth complete intersections in the euclidean space and of Bürgisser et al. (Math Comp 77(263):1559–1583, 2008) on hypersurfaces in the sphere, and gives a complete solution to Bürgisser and Cucker (Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol 349, Springer, Heidelberg, 2013, Problem 17).