
124 Wn.2d 845 (1994)
881 P.2d 247
WAYNE WATSON, Petitioner
v.
JAMES INGRAM, Respondent
No. 60829-6.
The Supreme Court of Washington, En Banc.
October 6, 1994.
As amended by order October 21, 1994.
Edwards, Sieh, Wiggins & Hathaway, by Malcolm L. Edwards; William G. Knudsen, for petitioner.
Ernest A. Bentley, for respondent.
[As amended by order of the Supreme Court October 21, 1994.]
JOHNSON, J.
Petitioner, a buyer under a residential real estate purchase and sale agreement, seeks to recover $15,000 *847 in earnest money he paid into escrow. At issue is whether the earnest money agreement is enforceable as liquidated damages.[1] More specifically, this case involves the test used to determine the enforceability of liquidated damages provisions in real estate purchase and sale agreements. The trial court enforced the agreement, finding it was a reasonable estimate of anticipated harm as of the date of contract formation. The Court of Appeals affirmed, likewise evaluating the provision as of the date of contract formation. Petitioner contends the seller suffered no actual damage and the courts below erred by not evaluating the liquidated damages provision as of the date of trial. We affirm.

FACTS
In the summer of 1990, Wayne Watson offered to buy James Ingram's Bellingham home for $350,000, with a $5,001 earnest money deposit. Watson's offer stipulated the agreement would be contingent upon the sale of Watson's Blaine, Washington, condominium. Ingram rejected Watson's offer, but made a counteroffer, which included a sale price of $355,000, and which eliminated the condominium sale contingency.
Watson accepted Ingram's counteroffer. On August 5, 1990, Watson and Ingram entered into a purchase and sale agreement according to the terms of Ingram's counteroffer. Under the agreement, the entire amount of the purchase price was due in cash on or before December 3, 1990. The agreement provided that Ingram would, at his expense, finish remodeling an office in the house, install a sprinkler system in the front yard, and paint the fence. The agreement required Watson to pay a $15,000 earnest money deposit into escrow at Kelstrup Realty, and provided that "[i]n the event of default by Buyer, earnest money shall be forfeited to Seller as liquidated damages, unless Seller elects to seek actual damages or specific performance". Clerk's Papers, at 9. Lastly, the agreement contained a provision entitled "BUYER'S REPRESENTATIONS", which stated, *848 "Buyer represents that buyer has sufficient funds available to close this sale in accordance with this agreement, and is not relying on any contingent source of funds unless otherwise set forth in this agreement". Clerk's Papers, at 8.
On September 11, 1990, Watson attempted to assume Ingram's $209,200 outstanding mortgage on the house. On October 18, 1990, the bank approved Watson's application conditioned upon Watson's obtaining approximately $116,050 of his own money for closing. Watson rejected the bank's terms and attempted to secure financing elsewhere.
On November 10, 1990, Watson sent a written proposal to Ingram seeking to modify the original agreement. The proposed modification would have allowed Watson to defer paying $54,000 of the $355,000 sale price for between 6 and 12 months after the scheduled December closing date. In exchange, Ingram would receive a second lien position on certain real estate Watson owned.
According to Ingram, the November 10 proposal was the first time he realized Watson did not have financing readily available for the purchase of the house. Ingram notified Watson on November 12, 1990, that he would not agree to modify the original agreement and intended to strictly enforce its terms. Ingram was involved in a child custody suit in California and wanted to move to that state as soon as possible.
On November 11, 1990, Ingram accepted a $380,000 "backup" offer on the house from Jamie and Sandro Catracchia. The Catracchia-Ingram agreement provided for a $10,000 earnest money deposit, which would become nonrefundable after December 3, 1990, the closing date of the Watson-Ingram agreement.
On November 14, 1990, Watson contacted a mortgage broker to apply for a new loan to finance the purchase of the house. The broker obtained a commitment from an "unnamed source" to loan Watson $266,250. December 3, 1990, the scheduled closing date, the broker notified Ingram and his agent of the loan commitment and, at Watson's request, asked *849 Ingram to extend the closing date so Watson could finalize the financing arrangements.
However, the broker refused to disclose the name of the person or institution that had allegedly committed for the $266,250 loan. In addition, the loan commitment contained several contingencies that had to be met by Watson before the loan would actually be made. One of the contingencies was that Watson would "evidence receipt of funds from income reserve balance of $88,864.56". Clerk's Papers, at 12. There was no evidence that Watson had the additional funds. Again Ingram refused to grant Watson an extension and the sale was not completed.
The sale to the Catracchias also failed. Ingram sued the Catracchias to recover the earnest money deposit. Ingram and the Catracchias settled, splitting the deposit. In September 1991, Ingram finally sold the house to a third party for $355,000, the same price that Watson had agreed to pay in December 1990.
Ingram and Watson each sought to recover Watson's $15,000 earnest money held in escrow. On December 4, 1990, Ingram wrote to Kelstrup Realty, indicating he was entitled to the $15,000 earnest money in escrow because Watson had defaulted. In January 1991, Watson filed this action to recover the earnest money, alleging it amounted to a penalty and Ingram had suffered no actual damages. Watson also alleged Ingram acted in bad faith by refusing to extend the closing date.
The trial court found the earnest money "was clearly intended by both parties to be non-refundable" if Watson defaulted and determined $15,000 was "a reasonable forecast by [Ingram and Watson] of damages that would be incurred by [Ingram] if [Watson] failed to complete the purchase". Clerk's Papers, at 13. The court entered judgment in favor of Ingram for the amount of the earnest money plus interest. The court also awarded Ingram his attorney fees pursuant to the parties' agreement. The Court of Appeals, Division One, affirmed. Watson v. Ingram, 70 Wn. App. 45, 851 P.2d 761 (1993). Watson now appeals to this court.


*850 ANALYSIS

I
[1-4] This case presents a single issue for review: whether the parties' contract provision requiring Watson to forfeit a $15,000 nonrefundable earnest money deposit is enforceable as liquidated damages. Liquidated damages clauses are favored in Washington, and courts will uphold them if the sums involved do not amount to a penalty or are not otherwise unlawful. Ashley v. Lance, 80 Wn.2d 274, 280, 493 P.2d 1242, 62 A.L.R.3d 962 (1972). To determine whether liquidated damages clauses are enforceable, Washington courts have applied a 2-part test from the Restatement of Contracts § 339, at 532 (1932). Liquidated damages clauses are upheld if the following two factors are satisfied:
First, the amount fixed must be a reasonable forecast of just compensation for the harm that is caused by the breach. Second, the harm must be such that it is incapable or very difficult of ascertainment.
Walter Implement, Inc. v. Focht, 107 Wn.2d 553, 559, 730 P.2d 1340 (1987) (citing Management, Inc. v. Schassberger, 39 Wn.2d 321, 327-28, 235 P.2d 293 (1951)).
The question before this court is whether this test is to be applied as of the time of contract formation (prospectively) or as of the time of trial (retrospectively). We have previously held the "[r]easonableness of the forecast will be judged as of the time the contract was entered". Walter Implement, 107 Wn.2d at 559. See also Mead v. Anton, 33 Wn.2d 741, 756, 207 P.2d 227, 10 A.L.R.2d 588 (1949); Northwest Acceptance Corp. v. Hesco Constr., Inc., 26 Wn. App. 823, 829, 614 P.2d 1302 (1980); Pettet v. Wonders, 23 Wn. App. 795, 801, 599 P.2d 1297, review denied, 93 Wn.2d 1002 (1979); Brower Co. v. Garrison, 2 Wn. App. 424, 433, 468 P.2d 469 (1970). Likewise, in the decision below, the Watson court adopted the time of contract formation as the proper time-frame. Watson, 70 Wn. App. at 54.
In contrast, a prior Division One opinion relied upon by Petitioner held the reasonableness of the estimate of damages and the difficulty of ascertainment of harm should be *851 measured as of the time of trial, and earnest money agreements should not be enforceable as liquidated damages if the nonbreaching party does not suffer actual damage. Lind Bldg. Corp. v. Pacific Bellevue Devs., 55 Wn. App. 70, 73, 776 P.2d 977, review denied, 113 Wn.2d 1021 (1989).
We agree with the Watson court and adopt the date of contract formation as the proper timeframe for evaluating the Restatement test. The prospective approach concentrates on whether the liquidated sum represents a reasonable prediction of the harm to the seller if the buyer breaches the agreement, and ignores actual damages except as evidence of the reasonableness of the estimate of potential damage.
We believe this approach better fulfills the underlying purposes of liquidated damages clauses and gives greater weight to the parties' expectations. Liquidated damages permit parties to allocate business and litigation risks. Even if the estimates of damages are not exact, parties can allocate and quantify those risks and can negotiate adjustments to the contract price in light of the allocated risks. Under the prospective approach, courts will enforce the parties' allocation of risk so long as the forecasts appear reasonable when made. See James A. Weisfield, Note, "Keep the Change!": A Critique of the No Actual Injury Defense to Liquidated Damages  Lind Building Corp. v. Pacific Bellevue Developments, 55 Wash. App. 70, 776 P.2d 977 (Div. 1), review denied, 113 Wash.2d 1021, 781 P.2d 1322 (1989), 65 Wash. L. Rev. 977, 990 (1990).
In addition to permitting parties to allocate risks, liquidated damages provisions lend certainty to the parties' agreements and permit parties to resolve disputes efficiently in the event of a breach. Rather than litigating the amount of actual damages, the nonbreaching party must only establish the reasonableness of the agreement. The prospective approach permits parties to rely on their stipulated amounts without having to precisely establish damages at trial. In contrast, if the reasonableness of the amount is judged retrospectively, against the damage actually suffered, the *852 "parties must fully litigate (at great expense and delay) that which they sought not to litigate." Weisfield, at 991.
Petitioner argues the prospective approach treats buyers unfairly because it permits sellers to retain earnest money deposits even when the seller suffers no actual damage, and this violates the principle that contract damages should be compensatory only. He further contends that by evaluating parties' liquidated damages agreements against actual damages established at trial, courts can most effectively determine whether such agreements were reasonable and fair.
We disagree. As this court has previously explained, "[w]e are loathe to interfere with the rights of parties to contract as they please between themselves...". Management, Inc. v. Schassberger, 39 Wn.2d 321, 326, 235 P.2d 293 (1951). It is not the role of the court to enforce contracts so as to produce the most equitable result. The parties themselves know best what motivations and considerations influenced their bargaining, and, while "[t]he bargain may be an unfortunate one for the delinquent party, ... it is not the duty of courts of common law to relieve parties from the consequences of their own improvidence ...". Reichenbach v. Sage, 13 Wash. 364, 368, 43 P. 354 (1896) (quoting Dwinel v. Brown, 54 Me. 468, 470 (1867)).
The retrospective approach fails to give proper weight to the parties' negotiations. At the time of contract formation, unpredictable market fluctuations and variations in possible breaches make it nearly impossible for contracting parties to predict "precisely or within a narrow range the amount of damages that would flow from breach". Weisfield, at 988. However, against this backdrop of uncertainty, the negotiated liquidated damages sum represents the parties' best estimate of the value of the breach and permits the parties to allocate and incorporate these risks in their negotiations. Under the prospective approach, a court will uphold the parties' agreed upon liquidated sum so long as the amount represents a reasonable attempt to compensate the nonbreaching party. On the other hand, if the reasonableness of a liquidated damages provision is evaluated under a retrospective *853 approach, the parties cannot confidently rely on their agreement because the liquidated sum will not be enforced if, at trial, it is not a close approximation of the damage suffered or if no actual damages are proved.[2]
Having adopted the date of contract formation as the proper timeframe for evaluating the Restatement test, the Restatement's second requirement loses independent significance. The central inquiry is whether the specified liquidated damages were reasonable at the time of contract formation. The reasonableness of liquidated damages is not determined retroactively by their correspondence with actual damages, but by reference to the prospective difficulty of estimating the possible damages that would flow from a breach. The prospective difficulty of estimating possible damages is merely an element of the court's inquiry into the reasonableness of a liquidated damages provision. The greater the prospective difficulty of estimating possible damages, the greater the range of reasonableness used in assessing a liquidated damages provision. See 3 E. Allan Farnsworth, Contracts § 12.18, at 288-89 (1990) (prospective difficulty of estimating possible damages should be a factor to be weighed in assessing whether liquidated damages provision is reasonable); Restatement (Second) of Contracts § 356 cmt. b, at 157 (1981) (the greater the difficulty of establishing the amount of loss, the easier it is to show a liquidated damages provision is reasonable).
We also agree with the Court of Appeals that in the context of real estate agreements, a requirement that damages be difficult to prove at trial would undermine the very purposes *854 of the liquidated damage provision: "certainty, assurance that the contract will be performed, and avoidance of litigation". Watson, 70 Wn. App. at 57 (citing Management, Inc., 39 Wn.2d at 326-27). It would "encourage litigation in virtually every case in which the sale did not close, regardless of whether the earnest money deposit was a reasonable estimate of the seller's damages". Watson, 70 Wn. App. at 56-57.
In sum, so long as the agreed upon earnest money agreement, viewed prospectively, is a reasonable prediction of potential damage suffered by the seller, the agreement should be enforced "without regard to the retrospective calculation of actual damages or the ease with which they may be proved". Watson, 70 Wn. App. at 54. The prospective difficulty of estimating potential damage is a factor to be used in assessing the reasonableness of the earnest money agreement.

II
Applying this reasonableness test prospectively to the Watson-Ingram agreement, we find the liquidated damages clause valid and enforceable. First, evaluating the agreement as of the time of contract formation, we find the liquidated sum was a reasonable forecast of just compensation for the harm that is caused by the breach. Walter Implement, 107 Wn.2d at 559. The $15,000 earnest money deposit represented several variables, including the value of the improvements Ingram was required to make under the contract, fluctuations in the real estate market, and lost value of the use of the net sale proceeds prior to the eventual sale of the property. Watson, 70 Wn. App. at 54. Each of these variables represents a significant potential loss to Ingram in the event of a breach by Watson. In addition, Ingram was specifically interested in a quick sale because he was attempting to relocate to California as soon as possible. The liquidated sum may have, in part, reflected the personal cost to Ingram of a delay in the sale date. Under these circumstances *855 we find $15,000 is not an unreasonable estimate of possible harm to Ingram in the event of a breach by Watson.
We likewise find Ingram's potential damages were difficult to ascertain at the time of contracting; the parties could not know what delays might ensue, what might occur in the real estate market, or how a failed sale might affect Ingram's plans. Real estate purchase and sale agreements are precisely the type of contracts that are amenable to liquidated damages provisions.
Under these facts, we hold the $15,000 earnest money agreement was a reasonable estimate of Ingram's potential damages in the event of a breach. Because Ingram is the prevailing party on appeal, he is entitled to reasonable attorney fees and costs pursuant to the parties' agreement.
The decision of the Court of Appeals is affirmed.
ANDERSEN, C.J., and UTTER, BRACHTENBACH, DOLLIVER, DURHAM, SMITH, GUY, and MADSEN, JJ., concur.
NOTES
[1]  The analysis in this case is consistent with that announced in Wallace Real Estate Inv., Inc. v. Groves, 124 Wn.2d 881, 868 P.2d 149 (1994), also filed today. Wallace Real Estate deals with a similar liquidated damages issue in the context of a commercial property transaction.
[2]  We note with respect to purchase and sale agreements providing for the forfeiture of an earnest money deposit to the seller as the seller's sole and exclusive remedy, the Legislature has eliminated the Lind court's actual damage requirement and legislatively defined the Restatement's reasonableness requirement. RCW 64.04.005(1)(a)(i) provides that such agreements are valid and enforceable, regardless of whether the seller incurs any actual damages, so long as the earnest money deposit does not exceed 5 percent of the purchase price.

The statute does not apply to this case because it only pertains to agreements executed on or after July 28, 1991, and is limited to agreements in which the earnest money deposit is the seller's sole remedy. Here, the agreement was executed August 6, 1990, and it gives the seller additional remedy options.
