We suggest a variational method for finding the ground state energy in pyramidal quantum dots. The method is based on using a Gaussian trial wavefunction. We developed an analytical expression for the expectation value of the carrier energy in quantum dots with a constant confining potential (within a single-band model). The problem of finding the ground state energy was reduced to the minimization of an analytical function of three trial function parameters. The proposed variational approach is much faster than the direct approach when solving the three-dimensional Schrödinger equation, does not demand any special software, and produces quite accurate values of the carrier ground state energy (an error does not exceed 2% of the potential well depth). Generalization of the method to multi-band models, spatially inhomogeneous potentials, effective mass discontinuity, and excited states is discussed. Applicability of the method to different quantum dot systems is considered.