Summary: Given a locally finite graded set A and a commutative, associative operation on A that adds degrees, we construct a commutative multiplication * on the set of noncommutative polynomials in A which we call a quasi-shuffle product; it can be viewed as a generalization of the shuffle product III. We extend this commutative algebra structure to a Hopf algebra (U, *, $Delta$); in the case where A is the set of positive integers and the operation on A is addition, this gives the Hopf algebra of quasi-symmetric functions. If rational coefficients are allowed, the quasi-shuffle product is in fact no more general than the shuffle product; we give an isomorphism exp of the shuffle Hopf algebra (U, III, $Delta$) onto (U, *, $Delta$) the set L of Lyndon words on A and their images $exp(w)mid$ w $isin$ L freely generate the algebra (U, *). We also consider the graded dual of (U, *, $Delta$). We define a $deformation * _{q}$ of * that coincides with * when q = 1 and is isomorphic to the concatenation product when q is not a root of unity. Finally, we discuss various examples, particularly the algebra of quasi-symmetric functions (dual to the noncommutative symmetric functions) and the algebra of Euler sums.