California Codes, Code of Civil Procedure - CCP, Part 2 — Of Civil Actions, Title 10.5 — Partition of Real and Personal Property, Chapter 6 — Sale of the Property, Article 4 — Disposition of Proceeds of Sale, Section 873.820
The proceeds of sale for any property sold shall be applied in the following order:
(a) Payment of the expenses of sale.
(b) Payment of the other costs of partition in whole or in part or to secure any cost of partition later allowed.
(c) Payment of any liens on the property in their order of priority except liens which under the terms of sale are to remain on the property.
(d) Distribution of the residue among the parties in proportion to their shares as determined by the court.
Notes
Requires sale proceeds to be applied first to sale expenses, then other partition costs or security for later-allowed partition costs, then liens in priority order unless the sale leaves them on the property, and finally to the parties in proportion to the shares determined by the court.
Use as reference
Lexinter.net | California Code, Code of Civil Procedure - CCP § 873.820 | https://laws.lexinter.net/codes/california/code-of-civil-procedure/part-2/title-10-5/chapter-6/article-4/section-873-820