I am kind of confused by the vast number of formulas for computing the Gaussian Curvature. Having a metric tensor / an expression for the line element in 4D (e.g. $t,x,y,z$ or in spherical coordinates $t,r,\theta,\phi$), what is the most general and neat way to calculate the Gaussian Curvature of a metric?
P.S. in order to achieve maximum generality I would consider a metric tensor with off-diagonal terms, so that mixed terms will pop up in the line element expression.