Miscibility
Miscibility is the property of substances to mix in all proportions, forming a homogeneous solution. The term is most often applied to liquids, but applies also to solids and gases. Water and ethanol, for example, are miscible because they mix in all proportions.
By contrast, substances are said to be immiscible if a significant proportion does not form a solution. Otherwise, the substances are considered miscible. For example, butanone is significantly soluble in water, but these two solvents are not miscible because they are not soluble in all proportions.
Organic compounds
In organic compounds, the weight percent of hydrocarbon chain often determines the compound's miscibility with water. For example, among the alcohols, ethanol has two carbon atoms and is miscible with water, whereas 1-octanol with eight carbons is not. Octanol's immiscibility leads it to be used as a standard for partition equilibria. This is also the case with lipids; the very long carbon chains of lipids cause them almost always to be immiscible with water. Analogous situations occur for other functional groups. Acetic acid (CH3COOH) is miscible with water, whereas valeric acid (C4H9COOH) is not. Simple aldehydes and ketones tend to be miscible with water, because a hydrogen bond can form between the hydrogen atom of a water molecule and the unbonded (lone) pair of electrons on the carbonyl oxygen atom.