Given a locally finite graded set A and a commutative, associative operation on A that adds degrees, we construct a commutative multiplication a on the set of noncommutative polynomials in A which we call a quasi-shuffle products it can be viewed as a generalization of the shuffle product III. We extend this commutative algebra structure to a Hopf algebra (U, a, Δ)s 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 products we give an isomorphism exp of the shuffle Hopf algebra (U, III, Δ) onto (U, a, Δ) the set L of Lyndon words on A and their images l exp(w) m w e Lr freely generate the algebra (U, a). We also consider the graded dual of (U, a, Δ). We define a deformation a_q of a that coincides with a when q e 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.