We give a complete classification of quadratic algebras A, with Hilbert series $H_A=(1-t)^{-3}$, which is the Hilbert series of commutative polynomials on 3 variables. Koszul algebras as well as algebras with quadratic Grobner basis among them are identified. We also give a complete classification of cubic algebras A with Hilbert series $H_A=(1+t)^{-1}(1-t)^{-3}$. These two classes of algebras contain all Artin-Schelter regular algebras of global dimension 3. As far as the latter are concerned, our results extend well-known results of Artin and Schelter by providing a classification up to an algebra isomorphism.