Phone accelerometer - formula to calculate angular gravity

I am taking readings from the accelerometer of a smartphone and want to account for gravity. My device reports residual gravity as "10g" (device stationary, screen facing up).

• As the angle of the device is adjusted to ~45° in the Z-Y plane (stationary, screen angled back) the Z-plane reads ~7g and the Y-plane reads ~7g for a total of ~14g.
• As the angle is flattened to ~22° (or when raised to ~67°) the figures change to ~8g/~4g respectively for a sum of ~12g.
• And as the angle lowers to 0° (or raises to 90°) the sum approaches the residual 10g in a single plane.

This change appears very rhythmic, is there a constant formula using the relationship of the Z & Y values where I can calculate the residual gravity of each the Z & Y planes no matter the angle of the device (assumed only between 0° and 90°)?

There are similar accelerometer questions pertaining to the complexities of calculating velocity too. I only seek a simple method to calculate residual gravity in 2 planes from a fixed position.

$$\lVert{a}\rVert = \sqrt{x^2 + y^2 + z^2 }$$