Abstract The inversion of surface deformation data at Long Valley, California for magma chamber geometry is not unique. An analytical solution in the form of an integral equation was developed to study if the stress variation with depth below the point of maximum uplift on the resurgent dome could constrain the shape and size of various ellipsoidal magma chambers, all of which explain the basic surface deformations. The integral solution accounts for the magma chamber pressurization interacting with a lithostatic stress field. The sensitivity of the results to the far-field boundary condition was tested by considering both zero lateral strain and a linearly increasing horizontal stress. A wide range of spherical sizes was examined because inversion of the formation data generally limit eccentricities of ellipsoids to a small range ( ϵ < 0.2), whereas size is largely unconstrained. The center of inflation is well constrained to be at 9.5 km depth. The stress at the surface is highly compressive for a 5-km radius spherical chamber, and is nearly zero for a 1-km radius chamber, when both are centered at 9.5-km depth and produce approximately the same surface deformation. The near-surface compressive stress for a large chamber greatly exceeds tectonic or lithostatic stresses. The compressive stress decreases with depth for the 5-km chamber, whereas it increases approximately lithostatically for the 1-km chamber. The stress field becomes tensile, or nearly tensile, as the top of the chamber is approached in all cases. The magnitude of the tensile stress is much higher for the 1-km case. Dike injection is inferred to be much more likely for a smaller chamber. The effect of ellipsoid shape is not as significant as size for the small eccentricities allowed by the Long Valley surface deformations. The surface compressive stress due to an oblate source is about 60 MPa larger than for a prolate source when the tops of the chambers are at the same depth. Part of this difference is due to the larger size of the oblate chamber. If the chamber volumes are held constant by allowing the depths to their tops to vary, then the difference between the prolate and the oblate cases is reduced to 15 MPa. In the absence of other stresses, breakouts may occur at 1-km depth for a 5-km radius spherical source, if the cohesive strength of the rock is less than 25 MPa. Borehole stability decreases when tectonic and other stresses are included.