Quantum meruit is a Latin phrase meaning "what one has earned". In the context of contract law, it means something along the lines of "reasonable value of services".
In the United States, the elements of quantum meruit are determined by state common law. For example, to state a claim for unjust enrichment in New York, a plaintiff must allege that (1) the defendant was enriched; (2) the enrichment was at plaintiff's expense; and (3) the circumstances were such that equity and good conscience require defendants to make restitution.
In laws of equity, unjust enrichment occurs when one person is enriched at the expense of another in circumstances that the law sees as unjust. Where an individual is unjustly enriched, the law imposes an obligation upon the recipient to make restitution, subject to defences such as change of position. Liability for an unjust (or unjustified) enrichment arises irrespective of wrongdoing on the part of the recipient. The concept of unjust enrichment can be traced to Roman law and the maxim that "no one should be benefited at another's expense": nemo locupletari potest aliena iactura or nemo locupletari debet cum aliena iactura.
The law of unjust enrichment is closely related to, but not coextensive with, the law of restitution. The law of restitution is the law of gain-based recovery. It is wider than the law of unjust enrichment. Restitution for unjust enrichment is a subset of the law of restitution in the same way that compensation for breach of contract is a subset of the law relating to compensation.