We give a characterization of primary ideals of finitely generated commutative monoids and in the case of finitely generated cancellative monoids we give an algorithmic method for deciding if an ideal is primary or not. Finally we give some properties of primary elements of a cancellative monoid and an algorithmic method for determining the primary elements of a finitely generated cancellative monoid. (C) 2001 Elsevier Science Inc. All rights reserved.