This paper presents the classification, over the fields of real and complex numbers, of the minimal Z 2 × Z 2 -graded Lie algebras and Lie superalgebras spanned by 4 generators and with no empty graded sector. The inequivalent graded Lie (super)algebras are obtained by solving the constraints imposed by the respective graded Jacobi identities.A motivation for this mathematical result is to sistematically investigate the properties of dynamical systems invariant under graded (super)algebras. Recent works only paid attention to the special case of the one-dimensional Z 2 × Z 2 -graded Poincaré superalgebra.As applications, we are able to extend certain constructions originally introduced for this special superalgebra to other listed Z 2 × Z 2 -graded (super)algebras. We mention, in particular, the notion of Z 2 × Z 2 -graded superspace and of invariant dynamical systems (both classical worldline sigma models and a quantum Hamiltonian).As a further byproduct we point out that, contrary to Z 2 × Z 2 -graded superalgebras, a theory invariant under a Z 2 × Z 2 -graded algebra implies the presence of ordinary bosons and three different types of exotic bosons, with exotic bosons of different types anticommuting among themselves.