The Hilbert function, its generating function and the Hilbert polynomial of a graded ring K[x1, . . . , xk ] have been extensively studied since the famous paper of Hilbert: Ueber die Theorie der algebraischen Formen ([Hilbert, 1890]). In particular, the coefficients and the degree of the Hilbert polynomial play an important role in Algebraic Geometry. If the ring grading is non-standard, then its Hilbert function is not eventually equal to a polynomial but to a quasi-polynomial. It turns out that a Hilbert quasi- polynomial P of degree n splits into a polynomial S of degree n and a lower degree quasi-polynomial T . We have completely determined the degree of T and the first few coefficients of P . Moreover, the quasi-polynomial T has a periodic structure that we have described. We have also developed a software to compute effectively the Hilbert quasi-polynomial for any ring K[x1 , . . . , xk]/I