Solubility
Solubility is a characteristic physical property referring to the ability for a given substance, the solute, to dissolve in a solvent. It is measured in terms of the maximum amount of solute dissolved in a solvent at equilibrium. The resulting solution is called a saturated solution. Certain liquids are soluble in all proportions with a given solvent, such as ethanol in water. This property is known as miscibility. Also, the equilibrium solubility can be exceeded under various conditions to give a so-called supersaturated solution, which is metastable.
In a solution, the solvent is often a liquid, which can be a pure substance or a mixture. The species that dissolves (the solute) can be a gas, another liquid, or a solid. Solubilities range widely, from infinitely soluble such as ethanol in water, to poorly soluble, such as silver chloride in water. The term insoluble is often applied to poorly soluble compounds, though strictly speaking there are very few cases where there is absolutely no material dissolved.

# Molecular view
Solubility occurs under dynamic equilibrium. This means that solubility should be viewed as a result of two simultaneous and opposing processes: dissolution and precipitation. The solubility equilibrium occurs when the two processes proceed at the same rate.
The solubility equilibrium is relatively straightforward for covalent substances such as ethanol. When ethanol dissolves in water, the ethanol molecules remain intact but form new hydrogen bonds with the water. However, when an ionic compound such as sodium chloride (NaCl) dissolves in water, the sodium chloride lattice dissociates into separate ions which are solvated (wrapped) with a coating of water molecules. Nonetheless, NaCl is said to dissolve in water, because evaporation of the solvent returns crystalline NaCl.
Sometimes the term "dissolving" is applied to an irreversible chemical reaction, as with iron in nitric acid, but in such a case the thermodynamic concept of solubility does not apply.
When it dissolves, a solute may form several species in the solution. For example, water above the crystals of ferrous hydroxide, Fe(OH)2, will, at equilibrium, contain Fe2+, Fe(OH)+, Fe(OH)2, Fe(OH)3- and possibly other complexes. Therefore, the solubility of ferrous hydroxide depends on pH. In general, solubility in the solvent phase can be given only for a specific solute which is thermodynamically stable, and the value of the solubility will include all the species in the solution (in the example above, all the iron-containing complexes).

# Factors affecting solubility
Solubility is defined for specific phases. For example, the solubility of aragonite and calcite in water are expected to be different, even though both are the same chemical substance (calcium carbonate).
The solubility of one substance dissolving in another is determined by the balance of intermolecular forces between the solvent and solute and the entropy change that accompanies the solvation. Factors such as temperature and pressure will alter this balance, thus changing the solubility.
Solubility may also strongly depend on the presence of other species dissolved in the solvent, for example, complex-forming anions (ligands) in liquids. Solubility will also depend on the excess (or deficiency) of a common ion (common-ion effect) in the solution. To a lesser extent, solubility will depend on the ionic strength of liquid solutions. The last two effects can be quantified using the equation for solubility equilibrium.
There is also a number of less common factors which may affect solubility. Solubility may depend on the crystal (or droplet) size of the solute phase (typically, solubility will increase with the decreasing crystal size for crystals much smaller than 1 m). For highly defective crystals, solubility may increase with the increasing degree of disorder. The last two effects, although of great practical importance, are not true solubility effects because true solubility occurs at equilbrium, which requires a perfect monocrystal. For substances dissolving in an electrochemical reaction, solubility is expected to depend on the potential of the solute phase.

## Temperature
The solubility of a given solute in a given solvent typically depends on temperature. For around 95% of solid solutes, the solubility increases with temperature, in the temperature range from about ambient to 100 C. In liquid water at high temperatures, (e.g., that approaching the critical temperature), the solubility of ionic solutes tends to decrease due to the change of properties and structure of liquid water (lower dielectric constant, less of a polar solvent).
Gaseous solutes exhibit more complex behavior with temperature. As the temperature is raised gases usually become less soluble in water, but more soluble in organic solvents.
The chart shows solubility curves for some typical inorganic salts (all solids). Many salts behave like barium nitrate and disodium hydrogen arsenate, and show a large increase in solubility with temperature. Some solutes (e.g. NaCl in water) exhibit solubility which is fairly independent of temperature. A few, such as cerium(III) sulfate, become less soluble in water as temperature increases. This is sometimes referred to as "retrograte" or "inverse" solubility. Occasionally, a more complex pattern is observed, as with sodium sulfate, where the less soluble decahydrate crystal loses water of crystallization at 32 C to form a more soluble anhydrous phase.
Organic compounds nearly always become soluble as the temperature is raised, in most solvents. The technique of recrystallization, used for purification of solids, depends on this differences in solubility in hot and cold solvent. There are a few exceptions, such as certain cyclodextrins.

## Pressure
For condensed phases (solids and liquids), the pressure dependence of solubility is typically weak and usually neglected in practice. Assuming an ideal solution, the dependence can be quantified as:
where Ni is the mole fraction of the ith component in the solution, P is the pressure, the index T refers to constant temperature, Vi,aq is the partial molar volume of the ith component in the solution, Vi,cr is the partial molar volume of the ith component in the dissolving solid, and R is the universal gas constant.
Henry's law states that the solubility of a gas in a liquid is directly proportional to the partial pressure of that gas above the liquid, which may be written as:
where k is a temperature-dependent constant (for example, 769.2 Latm/mol for dioxygen (O2) in water at 298 K), p is the partial pressure (atm), and c is the concentration of the dissolved gas in the liquid (mol/L).

## Polarity
A popular aphorism used for predicting solubility is "Like dissolves like" This indicates that a solute will dissolve best in a solvent that has a similar polarity to itself. This is a rather simplistic view, since it ignores many solvent-solute interactions, but it is a useful rule-of-thumb. For example, a very polar (hydrophilic) solute such as urea is highly soluble in highly polar water, less soluble in fairly polar methanol, and practically insoluble in non-polar solvents such as benzene. In contrast, a non-polar or lipophilic solute such as naphthalene is insoluble in water, fairly soluble in methanol, and highly soluble in non-polar benzene.
Liquid solubilities also generally follow this rule. Lipophilic plant oils, such as olive oil and palm oil, dissolve in non-polar gasoline (petrol), but polar liquids like water will not mix with gasoline.
Synthetic chemists often use the different solubilities of compounds to separate and purify compounds from reaction mixtures.

# Rate of dissolution
Dissolution is not always an instantaneous process. It is fast when salt and sugar dissolve in water but much slower for a tablet of aspirin or a large crystal of hydrated copper(II) sulfate. The speed at which a solid dissolves may depend on its crystalline properties (crystalline vs amorphous, crystal size) and the presence of polymorphism. This is important in many practical systems, for example in designing methods for controlled drug delivery. Critically, the dissolution rate depends on the presence of mixing and other factors that determine the degree of undersaturation in the liquid solvent film immediately adjacent to the solid solute crystal. In some cases, solubility equilibria can take a long time to establish (hours, days, months, or many years; depending on the nature of the solute and other factors). In practise, it means that the amount of solute in a solution is not always determined by its thermodynamic solubility, but may depend on kinetics of dissolution (or precipitation).
The rate of dissolution and solubility should not be confused--they are different concepts (kinetic and thermodynamic, respectively).

# Quantification of solubility
Solubility is commonly expressed as a concentration, either mass concentration (g of solute per kg of solvent, g per 100 mL (dL) of solvent), molarity, molality, mole fraction or other similar descriptions of concentration. The maximum equilibrium amount of solute that can dissolve per amount of solvent is the solubility of that solute in that solvent under the specified conditions. The advantage of expressing solubility in this manner is its simplicity, while the disadvantage is that it can strongly depend on the presence of other species in the solvent (for example, the common ion effect).
Solubility constants are used to describe saturated solutions of ionic compounds of relatively low solubility (see solubility equilibrium). The solubility constant is a special case of an equilibrium constant. It describes the balance between dissolved ions from the salt and undissolved salt. The solubility constant is also "applicable" (i.e. useful) to precipitation, the reverse of the dissolving reaction. As with other equilibrium constants, temperature can affect the numerical value of solubility constant. The solubility constant is more complicated than solubility. However, the value of this constant is generally independent of the presence of other species in the solvent.
Henry's law is used to quantify the solubility of gases in liquids as a function of the gas's partial pressure. It is a special case of a solubility equilibrium.
The Flory-Huggins solution theory is a theoretical model describing the solubility of polymers. The Hansen Solubility Parameters and the Hildebrand solubility parameters are empirical methods for the prediction of solubility. it is also possible to predict solubility from other physical constants such as the enthalpy of fusion.
The partition coefficient (Log P) is a measure of differential solubility of a compound in a hydrophobic solvent (octanol) and a hydrophilic solvent (water). The logarithm of these two values enables compounds to be ranked in terms of hydrophilicity (or hydrophobicity).

# Applications
Solubility is of fundamental importance in a large number of scientific disciplines and practical applications, the most obvious ones being in chemical engineering, material science, geology, and environmental science.
Solubility is often said to be one of the "characteristic properties of a substance". This means that solubility is commonly used to describe the substance, to shed light on the nature of the substance, to help to distinguish it from other substances, and to guide with an application of the substance. For example, indigo is described as "insoluble in water, alcohol, or ether but soluble in chloroform, nitrobenzene, or concentrated sulfuric acid".
For example, solubility of a substance is useful when separating mixtures. For example, a mixture of salt (sodium chloride) and silica may be separated by dissolving the salt in water, and filtering off the undissolved silica. The synthesis of chemical compounds, by the milligram in a laboratory, or by the ton in industry, both make use of the relative solubilities of the desired product, as well as unreacted starting materials, byproducts, and side products to achieve separation.
Another example of this would be the synthesis of benzoic acid from phenylmagnesium bromide and dry ice. Benzoic acid is more soluble in an organic solvent such as dichloromethane or diethyl ether, and when shaken with this organic solvent in an separatory funnel, will preferentially dissolve in the organic layer. The other reaction products, i.e. the magnesium bromide will remain in the aqueous layer, clearly showing that separation based on solubility is achieved. (On a practical note, the benzoic acid obtained after evaporating the organic solvent should ideally be purified by recrystallizing from hot water.)

# Solubility of ionic compounds in water
Ionic compounds (salts) dissolve in water because of the  attraction between positive and negative charges.  For example, the salt's positive ions (i.e. Ag+) attract the partially-negative oxygens in H2O.  Likewise, the salt's negative ions (i.e. Cl-) attract the partially-positive hydrogens in in H2O. Note: oxygen is partially-negative because it is more electronegative than hydrogen, and vice-versa (see:chemical polarity).
However, there is a limit to how much salt can be dissolved in a given volume of water (1 liter, for example).  This amount is given by the solubility product (Ksp).  This value depends on both the type of salt (AgCl vs. NaI, for example) and the temperature of the water.
To calculate how much AgCl can dissolve in 1 liter of water, some algebra is required.  First,
Next, realize that  =  since there is always one Ag+ ion for every Cl- ion.  Using this fact,
The result: 1 liter of water can dissolve 1.34  10-5 moles of AgCl(s) at room temperature.  Compared with other types of salts, AgCl is not very soluble in water.  In contrast, household table salt (NaCl) has a higher Ksp and is, therefore, more soluble.

# Solubility of organic compounds
The principle outlined above under polarity, that like dissolves like, is the usual guide to solubility with organic systems. For example, petroleum jelly will dissolve in gasoline; both of which are lipophilic. This is because petroleum jelly consists of long carbon chains, as does the gasoline. It will not, on the other hand, dissolve in alcohol or water, since the polarity of these solvents is too high. Sugar will not dissolve in gasoline, since sugar is too polar in comparison with gasoline. A mixture of gasoline and sugar can therefore be separated by filtration, or extraction with water.

# Solid solubility
This term is often used in the field of metallurgy to refer to the extent that an alloying element will dissolve into the base metal without forming a separate phase. The solubility line (or curve) is the line (or lines) on a phase diagram which give the limits of solute addition. That is, the lines show the maximum amount of a component that can be added to another component and still be in solid solution. In microelectronic fabrication, solid solubility refers to the maximum concentration of impurities one can place into the substrate.

# Incongruent dissolution
Many substances dissolve congruently, i.e., the composition of the solid and the dissolved solute stoichiometrically match. However, some substances may dissolve incongruently, whereby the composition of the solute in solution does not match that of the solid. This is accompanied by alteration of the "primary solid" and possibly formation of a secondary solid phase. However, generally, some primary solid also remains and a complex solubility equilibrium establishes. For example, dissolution of albite may result in formation of gibbsite.
In this case, the solubility of albite is expected to depend on the solid-to-solvent ratio. This kind of solubility is of great importance in geology, where it results in formation of metamorphic rocks.