We present an explicit analytical approach for calculating the distribution of stress around a circular cased borehole in a general anisotropic formation. This approach is developed based on a pure elastic cased borehole model, which can include multiple cemented concentric casing strings that are surrounded by a homogeneous anisotropic medium. The wall of the innermost casing is under the compression of borehole internal fluid pressure, and the formation can be subjected to arbitrary far-field stresses. Every casing-cement boundary is assumed to be welded, so as the cement-formation boundary. The derived analytical solution can be applied to an arbitrary wellbore trajectory in an arbitrary anisotropic formation and is also applicable to degenerate isotropic formations. Accuracy and robustness of the analytical solution is validated through comparing its results with those calculated from the classical Kirsch solution for an isotropic example that has identical elastic properties for all materials and from a finite element method for an anisotropic cased borehole example.