
83 Wis.2d 378 (1978)
265 N.W.2d 269
KLUG & SMITH COMPANY, Respondent,
v.
SOMMER, and another, d/b/a Fair Park Ice Arena, Appellants.
No. 75-840.
Supreme Court of Wisconsin.
Submitted on briefs January 5, 1978.
Decided May 2, 1978.
*380 For appellants the cause was submitted on the brief of Thomas N. Klug and Borgelt, Powell, Peterson & Frauen, S. C. of Milwaukee.
For respondent the cause was submitted on the brief of C. James Heft, Carroll R. Heft and Heft, Dye, Heft & Paulson of Racine.
*381 CALLOW, J.
The only issue on this appeal is whether the trial court erred in permitting the prevailing party, the plaintiff in this breach of contract action, to recover prejudgment interest. The plaintiff is Klug & Smith Company (K & S), a Wisconsin corporation; and the defendants are two partners, William Sommer and Richard Gebhardt, d/b/a Fair Park Ice Arena (the Arena).[1] In June, 1973, K & S agreed to erect a building to house a skating rink at State Fair Park in West Allis, Wisconsin. The contract price agreed upon was approximately $208,000. By mutual agreement of the parties certain "extras" were added to the contract price in the amount of approximately $20,000, for a total contract price of approximately $228,000.
K & S erected the structure, but the Arena held back approximately $102,000 for the reason that K & S had not substantially completed the contract. In an agreement executed on March 26, 1974, the parties attempted to resolve their dispute over completion on or before July 1, 1974. This agreement provided that upon execution the Arena remit all but $67,555.32 of the amount due on the principal contract including extras and that on or before July 1, 1974, the Arena remit the $67,555.32, less the costs of repair of defects and the diminished value of any unrepaired or unrepairable defects as of July 1, 1974. The agreement also provided that the amount due on July 1 would bear interest from the date of the agreement until paid.
Despite the March 26 agreement, the parties could not resolve the dispute by July 1 or any other date. As a result, K & S commenced this suit against the Arena to recover moneys due under the contract in the amount of $67,555.32, the amount withheld pursuant to the March *382 26 agreement. In its answer the Arena alleged that the sums withheld "are equal to or less than the sums necessary to eliminate, correct or complete the contracts." The Arena further alleged as a setoff that K & S were negligent in the performance of the contract and that the negligence damaged the Arena in an amount equal to or greater than the amount withheld.
The case was tried to a jury. The jury found that K & S did not perform its contract according to the plans and specifications in a proper and workmanlike manner and that the amount of money which would reasonably and fairly compensate the plaintiff for the construction work done for which it has not been paid was $50,500. K & S moved for judgment on the verdict, including prejudgment interest as provided for in the agreement, while the Arena moved for a judgment on the verdict without prejudgment interest. The trial court ruled that K & S was entitled to prejudgment interest in the amount of $4,739.85. The Arena has appealed.
[1, 2]
In a proper case prejudgment interest[2] can be recovered as an element of compensatory damages. Wyandotte Chemicals Corp. v. Royal Electric Mfg., 66 Wis.2d 577, 582, 225 N.W.2d 648 (1975); Laycock v. Parker, 103 Wis. 161, 179-181, 79 N.W. 327 (1899). In addition, when the parties explicitly agree, either in their principal contract or in a supplementary stipulation or agreement, that damages will or will not include prejudgment interest, the parties will be held to that agreement, whether or not interest would be proper without such an agreement. See, e.g., Kleinschmidt v. Aluminum & Bronze Foundry, 274 Wis. 231, 79 N.W.2d 802 (1956); Wyandotte Chemicals Corp. v. Royal Electric Mfg., supra.
*383 The provisions concerning interest in the March 26 agreement are as follows:
"7. That the sums due and owing from Arena to K & S on July 1, 1974 shall bear interest at the legal rate from the date of this Agreement until paid; that it is understood and agreed by and between the parties that the amount being withheld on the principal contract represents the following estimated contract costs:


1. Building minus structural steel
   frame and inner liner panels          $28,123.69;
2. Insulation                            $ 4,512.28;
3. Erection of remaining portion of
   building                              $13,200.00;
4. Cost of tear down                     $13,200.00;
5. Cost of removal of inner liner
   panels                                $ 1,900.00;
6. Erection of inner liner panels        $ 1,900.00
                                         ___________
                          Total          $62,835.97;

". . .
"9. That it is further understood that in the event the parties can mutually agree on the existence of substantial completion prior to July 1, 1974, such sums as are due and owing from Arena to K & S in accordance with the foregoing provisions of this Agreement shall be immediately payable and which sums shall bear interest at the legal rate from the date of this Agreement until paid." (Emphasis supplied.)
The trial court interpreted these provisions, by which the Arena agreed that "[all] sums as are due and owing . . . shall bear interest . . . until paid," to provide for the payment of prejudgment interest. The Arena, however, contends that the trial court's interpretation of the agreement is wrong. It argues that the parties intended to provide for the payment of interest only if the dispute was solved on or before July 1, 1974, and that the agreement was not intended to establish the conduct of the parties in the event the dispute remained unsolved. We can suggest a third and equally plausible interpretation: *384 that the parties never foresaw that they might fail to settle the dispute pursuant to the agreement and that the dispute would be litigated.
There was no hearing on the issue of prejudgment interest. Except for the agreement itself, the only evidence before the trial court of the intent of the parties was the conflicting declarations of the parties themselves. Further, the Arena did not include the trial transcript in the appeal record, and any evidence in the transcript bearing upon the parties' intention in executing the March 26 agreement is not before this court.
We think the trial court's interpretation of the agreement is a reasonable one, and the record provides little basis for setting it aside. However, the proper interpretation of the agreement is irrelevant in this case because, even if we accept the Arena's interpreation, i.e., that the parties did not agree to pay interest if the dispute remained unsolved after July 1, 1974, the award of prejudgment interest was proper. If the question of prejudgment interest is not governed by the agreement, then it is governed by our rules for the recovery of prejudgment interest; and those rules permit the award of prejudgment interest in this case.
[3, 4]
Prejudgment interest may be awarded only if the amount of damages is ascertainable or determinable prior to judicial determination, i.e., where there is a reasonably certain standard of measurement when correctly applied one can ascertain the amount owed. Pappas v. Jack A. Nelsen Agency, Inc., 81 Wis.2d 363, 374, 260 N.W.2d 721 (1978); Olguin v. Allstate Insurance Co., 71 Wis.2d 160, 237 N.W.2d 694 (1976); Wyandotte Chemicals Corp. v. Royal Electric Mfg., supra at 582. Where the amount owed is readily ascertainable and not paid, the withholding party should be held responsible for making such determination correctly and liable for interest. *385 Olguin v. Allstate Insurance Co., supra; State ex rel. Schilling & Klingler v. Baird, 65 Wis.2d 394, 222 N.W.2d 666 (1974).
[5, 6]
One of the tests for determining whether the amount owing is ascertainable to the extent it would place liability for prejudgment interest on the withholding party, is whether the claim represents a "genuine dispute." Dahl v. Housing Authority of the City of Madison, 54 Wis.2d 22, 31, 194 N.W.2d 618 (1972). Where the record shows no more than putting the plaintiff to his proof, prejudgment interest is appropriate, see, e.g., Dahl v. Housing Authority, supra, while a substantial variance between the amount prayed for and the amount recovered is indicative of a genuine controversy and an unascertainable amount owed; Congress Bar & Restaurant v. Transamerica Insurance Co., 42 Wis.2d 56, 165 N.W.2d 409 (1969).
[7]
However, a comparison of the amount prayed for with the amount ultimately awarded is of little value when a setoff or a counterclaim is involved. Ordinarily, where the amount of a demand is sufficiently certain to justify the allowance of interest, the existence of a setoff, counterclaim, or cross-claim which is unliquidated will not prevent the recovery of interest on the balance of the demand found due from the time it became due. Maslow Cooperage Corp. v. Weeks Pickle Co., 270 Wis. 179, 70 N.W.2d 577 (1955): quoting 47 C.J.S. Interest sec. 19b, p. 31; De Toro v. DI-LA-CH, Inc., 31 Wis.2d 29, 142 NW2d 192 (1966); Wyandotte Chemicals Corp. v. Royal Electric Mfg., supra. As this court stated in Wyandotte:
"... [A] setoff, counterclaim or cross-claim does not in itself affect the value of the damages being withheld from the injured party but merely results in the mathematical crediting of one independent claim against a *386 competing independent claim after each has been fully established to the satisfaction of the court." 66 Wis.2d at 584.
[8-10]
If a construction contract is substantially performed, the builder can recover the contract price less setoffs, if any. Plante v. Jacobs, 10 Wis.2d 567, 570, 103 N.W.2d 296 (1960). The test of substantial performance is not strict compliance with the plans and specifications of the contract, unless all details are of the essence, but whether the builder's performance meets the essential purposes of the contract. Stevens Construction Corp. v. Carolina Corp., 63 Wis.2d 342, 217 N.W.2d 291 (1974); De Sombre v. Bickel, 18 Wis.2d 390, 118 N.W.2d 868 (1963); Plante v. Jacobs, supra. Recovery upon substantial completion is the contract price less the reasonable costs of remedying defects and the diminished value of the building so completed. W. G. Slugg Seed & Fertilizer, Inc. v. Paulsen Lumber, Inc., 62 Wis.2d 220, 214 N.W.2d 413 (1974). Such recovery is ordinarily ascertainable prior to a judicial determination, and prejudgment interest is appropriate.
[11, 12]
Thus, this court has permitted prejudgment interest on a builder's recovery of the balance due on a contract that he has substantially performed, even though we granted a setoff for defective workmanship.[3]De Toro v. DI-LA-CH, supra. The same rule is followed in other jurisdictions. Annot., 60 A.L.R.3d 487 (1974). On the other hand, in a case where the builder's right to any sum due on the contract involves the determination of whether *387 he had substantially performed, this court held that the amount of the builder's claim was unascertainable and denied prejudgment interest. Stevens Construction Corp. v. Carolina Corp., supra; see also, Kraemer Bros. Inc. v. Prepakt Concrete Co., 432 F. Supp. 462 (W.D. 1977).
In this case although the dispute is over what the parties call "substantial completion" of the contract, substantial performance, as this court has defined the term, does not appear to be the issue litigated. The Arena's answer does not set up lack of substantial performance as an affirmative defense.[4] The answer merely sets up as affirmative defenses lack of complete performance and negligence. In addition, the Arena did not request an instruction on lack of substantial performance. The only question regarding performance answered by the jury was that requested by K & S: "Did the plaintiff, Klug & Smith Company, and its subcontractors perform its contract . . . according to the plans and specifications in a proper and workmanlike manner?" This question is directed at complete rather than substantial performance. The damage question asked by the jury was "What sum of money will reasonably and fairly compensate the plaintiff, Klug & Smith Company, for the construction work done . . . for which the plaintiff has not been paid?" Although this question is consistent with a theory of quantum meruit recovery, it is not inconsistent with *388 a theory of recovery based on substantial completion of a contract, contract price minus the costs of repair.
[13, 14]
It is impossible to make a conclusive determination of whether substantial performance was a genuine issue between the parties because the trial transcript is not in the appeal record. We know nothing about the nature of the defects of which the Arena complains or about the nature of the repair work necessary to correct them. Where the record is incomplete, this court's review is limited to whether the record as filed sustains the judgment. De Toro v. DI-LA-CH, Inc., supra at 33; Estate of Reynolds, 24 Wis.2d 370, 374, 129 N.W.2d 251 (1964). Considering the fact that on a $228,000 contract the jury subtracted only $16,500 for defective performance on this limited record, it is reasonable to conclude that substantial performance was not an issue in the case and that the jury in effect set off the costs of repair against the reasonable contract costs as the parties failed to do pursuant to the agreement. The precise measure of the amounts claimed to be due by K & S is agreed upon in the March 26 agreement. This agreement created an ascertainable claim, and the setoff made by the jury does not make indeterminable this otherwise determinable claim. Thus we hold that on the record before us K & S would be entitled to prejudgment interest even if the parties did not agree to such interest themselves. For that reason we affirm the trial court's award of prejudgment interest.
By the Court.Judgment affirmed.
NOTES
[1]  The appellant Arena did not file a transcript of the trial proceedings. The facts stated in this opinion are as they appear in the appeal record.
[2]  All judgments bear interest from the date of entry of the judgment until paid. Sec. 815.05 (8), Stats.
[3]  But where it is the owner who sues for defects in performance and the builder counterclaims for the balance due, the builder's claim is unascertainable and the prejudgment interest is improper. See, e.g., W. G. Slugg Seed & Fertilizer, Inc. v. Paulsen Lumber, Inc., supra.
[4]  While the burden is on the builder to prove the contract price or the reasonable value of its performance, it is the owner's burden to prove lack of substantial performance and the reduction in value or costs of repair of the builder's failure to completely perform. De Sombre v. Bickel, supra; Kraemer Bros., Inc. v. Prepakt Concrete Co., supra. In Stevens Construction Corp. v. Carolina Corp., supra at 359, this court stated that the builder has the burden of proving substantial performance. However, as pointed out by the federal court in Kraemer, this statement was an inadvertent error in view of long-standing cases to the contrary which were not mentioned by the court. 432 F. Supp. at 464.
