Thermodynamic conditions are derived here for binary alloys to have their grain boundary (GB) energies negative, ensuring the stability of some nano-grained (NG) alloys. All binary alloys are found to belong to one of the following three types. Type 1 is the unstable NG alloy both against grain coarsening and precipitation of a macro-phase. Type 2 is the partly stable NG alloy, stable against coarsening but not against precipitation. Type 3 is the fully stable NG alloy, both against coarsening and precipitation. Alloys type 1 have negative, or low-positive interaction energies between the components. Alloys type 2 have medium-positive interaction energies, while alloys type 3 have high-positive interaction energies. Equations are derived for critical interaction energies separating alloys type 1 from type 2 and those from type 3, being functions of the molar excess GB energy of the solute, temperature (T) and composition of the alloy. The criterion to form a stable NG alloy is formulated through a new dimensionless number (Ng), defined as the ratio of the interaction energy to the excess molar GB energy of the solute, both taken at zero Kelvin. Systems with Ng number below 0.6 belong to alloy type 1, systems with Ng number between 0.6 and 1 belong to alloy type 2, while systems with Ng number above 1 belong to alloy type 3, at least at T = 0 K. The larger is the Ng number, the higher is the maximum T of stability of the NG alloy. By gradually increasing temperature alloys type 3 convert first into type 2 and further into type 1. The Ng number is used here to evaluate 16 binary tungsten-based (W-B) alloys. At T = 0 K type 3 NG alloys are formed with B = Cu, Ag, Mn, Ce, Y, Sc, Cr; type 2 is formed in the W-Ti system, while type 1 alloys are formed with B = Al, Ni, Co, Fe, Zr, Nb, Mo and Ta. For the WAg system the region of stability of the NG alloys is shown on a calculated phase diagram, indicating also the stable grain size.