In finite element software the end user is required to supply the consistent tangent modulus tensor for an invariant-based potential function which in turn requires the formulae for the derivatives, with respect to the right Cauchy-Green tensor, of invariants that described the invariant-based potential function. Currently, a cumbersome process of individually evaluating the formulae for the derivatives of tensor invariants was done and only derivative formulae for invariants that can be expressed explicitly in terms of the right Cauchy-Green tensor can be found in the literature; derivative formulae for invariants that cannot be expressed explicitly in terms of the right Cauchy-Green tensor, for use in finite element software, do not exist in the literature. We note that these implicit invariants have been recently used in non-linear anisotropic elasticity. Hence, to avoid the cumbersome process of individually evaluating the derivative-invariant formulae and to supply the currently non-existent derivative-invariant formulae for implicit invariants, we give a general spectral formula for the consistent tangent modulus tensor for an invariant-based potential function that contain invariants, which may depend explicitly or implicitly on the right Cauchy-Green tensor. For a particular invariant, the spectral formula given in this paper only requires the end user to input a function, and its derivatives, that depend on a principal stretch and a set of second order tensors that does not depend on the right Cauchy-Green tensor. The formula given here can also be used for invariants that contain material constants.