A quasi-local energy for Einstein's general relativity is defined by the value of the preferred boundary term in the covariant Hamiltonian formalism. The boundary term depends upon a choice of reference and a time-like displacement vector field (which can be associated with an observer) on the boundary of the region. Here, we analyze the spherical symmetric cases. For the obvious analytic choice of reference based on the metric components, we find that this technique gives the same quasi-local energy values using several standard coordinate systems and yet can give different values in some other coordinate systems. For the homogeneous-isotropic cosmologies, the energy can be non-positive, and one case which is actually flat space has a negative energy. As an alternative, we introduce a way to determine the choice of both the reference and displacement by extremizing the energy. This procedure gives the same value for the energy in different coordinate systems for the Schwarzschild space, and a non-negative value for the cosmological models, with zero energy for the dynamic cosmology which is actually Minkowski space. The time-like displacement vector comes out to be the dual mean curvature vector of the two-boundary.