In law and in cultural anthropology, affinity, as distinguished from consanguinity (blood relationship), is the kinship relationship that is created or exists between two or more people as a result of someone's marriage. It is the relationship which each party to a marriage has to the relations of the other partner to the marriage; but does not cover the marital relationship of the parties to the marriage themselves. Though laws vary considerably, affinity does not always cease with the death of one of the marriage partners through whom affinity is traced, nor with the divorce of the marriage partners. In addition to kinship by marriage, "affinity" can sometimes also include kinship by adoption and step relationship.
Under the law, such relatives by marriage are known as affines. More commonly, they are known as "in-laws", as affinity is usually signified by adding "" to a degree of kinship.
In law, affinity may be relevant in relation to prohibitions on incestuous sexual relations and in relation to whether particular couples are prohibited from marrying. Which relationships are prohibited vary from country to country, and have varied over time. In some countries, especially in the past the prohibited relationships were based on religious laws. (See, for example, Affinity under canon law.)