This paper generalizes a proof of certain results by Hellström and Silvestrov on centralizers in graded algebras. We study centralizers in certain algebras with valuations. We prove that the centralizer of an element in these algebras is a free module over a certain ring. Under further assumptions we obtain that the centralizer is also commutative.