canada
Generally, there is no need for a spousal agreement to match what a judge would have ordered. The parties' agreement about what they viewed to be fair need only fall within a range of equitable possibilities as understood under the applicable act.
The Supreme Court of Canada explained (Anderson v. Anderson, 2023 SCC 13; internal citations removed):
[33] ... As a starting point, domestic contracts should generally be encouraged and supported by courts, within the bounds permitted by the legislature, absent a compelling reason to discount the agreement. This deference flows from the recognition that self-sufficiency, autonomy and finality are important objectives in the family law context. Not only are parties better placed than courts to understand what is fair within the context of their relationship, but the private resolution of family affairs outside the adversarial process avoids the cost and tumult of protracted litigation.
[34] At the same time, negotiations over domestic contracts take place in a singularly challenging environment, often at a time of acute emotional stress, “in which one or both of the parties may be particularly vulnerable”. In this context, the simple application of ordinary principles of contractual validity may be inadequate to quiet concerns of imbalance and exploitation. Rather, judges must approach family law settlements with a view to balancing the values of contractual autonomy and certainty with concerns of fairness. In essence, judges are to review domestic contracts with particular sensitivity to the vulnerabilities that can arise in the family law context, without presuming that spouses lack the agency to contract simply because the agreement was negotiated in an emotionally stressful context.
...
[42] ... nearly all provincial family property regimes let spouses contract out of the scheme by private agreement, so long as their agreements meet certain formal requirements, with the exception of Quebec. As a minimum, most regimes require that an agreement be in writing, signed by both parties, and witnessed to exempt family property from distribution under the statute. Some also include additional requirements, such as disclosure between the parties. These statutory formalities serve to impress upon spouses the significance of their agreement and to encourage and preserve the validity of binding family property settlements. If an agreement meets the legislative requirements, it can generally only be set aside upon a finding of significant unfairness or unconscionability.
...
[50] ... Given the considerable value placed on spousal autonomy to contract in the legislation and the jurisprudence, the substance of an agreement that represents the parties’ subjective understanding of what property division was appropriate in the context of their relationship at the time of separation merits serious consideration.
[51] Ultimately, however, the weight given to the agreement in an order for the distribution of property depends on how its substance accords with what is fair and equitable in the circumstances, considering the objectives and factors of the legislative scheme. ... The standard is not strict compliance with statutory entitlements, however, as such a review risks gutting the FPA’s enablement of private ordering. The question is whether the parties’ autonomous choice at the time of separation falls within a range of fair and equitable possibilities contemplated by the FPA ....