Theoretical relations among local and nonlocal damage variables in localized band as well as global damage variable according to the measured stress-strain curve of quasi-brittle material subjected to shear and tensile failures in uniaxial compression and in three-point bending were presented. The nolocal damage variable depends on the local counterpart and its second spatial gradient based on nonlocal theory. Analytical solution for the local damage variable was derived by substitution of the nonlocal damage variable for averaged damage variable in shear band and by using boundary condition as well as by resorting to the assumption that the actual thickness of shear band corresponds to the maximum local damage variable. It is found that local damage variable depends on the internal length parameter, coordinate, flow shear stress, shear strength, shear elastic and softening moduli. Assuming that the shear localization is initiated just at the peak strength, and that afterwards the strain-softening behavior of specimen occurs. The relation among shear strength, uniaxial compressive strength, flow shear and compressive stresses was established. The global damage variable was defined according to the measured stress-strain curve whether the post-peak response is snap-back or snap-through, which depends on the uniaxial compressive strength and flow compressive stress. A relation among local, nonlocal, and global damage variables in uniaxial compression was proposed analytically, and then a relation applicable to three-point bending was directly presented. The latter relation can be simplified for uniaxial tension condition if tensile stress is assumed to be uniform. Two examples were presented to investigate the two- and three-dimensional distributions of local damage variable in shear and tensile localized bands. The present analytical solutions for the distributed damage in shear and tensile localized bands qualitatively agree with the previous numerical predictions.