We developed a statistical thermodynamic algorithm for analyzing solvent-induced folding/unfolding transitions of proteins. The energetics of protein transitions is governed by the interplay between the cavity formation contribution and the term reflecting direct solute-cosolvent interactions. The latter is viewed as an exchange reaction in which the binding of a cosolvent to a solute is accompanied by release of waters of hydration to the bulk. Our model clearly differentiates between the stoichiometric and non-stoichiometric interactions of solvent or co-solvent molecules with a solute. We analyzed the urea- and glycine betaine (GB)-induced conformational transitions of model proteins of varying size which are geometrically approximated by a sphere in their native state and a spherocylinder in their unfolded state. The free energy of cavity formation and its changes accompanying protein transitions were computed based on the concepts of scaled particle theory. The free energy of direct solute-cosolvent interactions were analyzed using empirical parameters previously determined for urea and GB interactions with low molecular weight model compounds. Our computations correctly capture the mode of action of urea and GB and yield realistic numbers for (∂∆G°/∂a3)T,P which are related to the m-values of protein denaturation. Urea is characterized by negative values of (∂∆G°/∂a3)T,P within the entire range of urea concentrations analyzed. At concentrations below ∼1 M, GB exhibits positive values of (∂∆G°/∂a3)T,P which turn positive at higher GB concentrations. The balance between the thermodynamic contributions of cavity formation and direct solute-cosolvent interactions that, ultimately, defines the mode of cosolvent action is extremely subtle. A 20% increase or decrease in the equilibrium constant for solute-cosolvent binding may change the sign of (∂∆G°/∂a3)T,P thereby altering the mode of cosolvent action (stabilizing to destabilizing or vice versa).