The plaintiff, Robert Sperry, initiated this action to foreclose a mechanic’s lien. The complaint is based on the breach of a construction contract and quantum meruit. The named defendant, Jeffrey E. Moler, and his wife, Elaine D. Moler, owners of the premises, pleaded negligence and breach of contract *693by way of a special defense and claimed damages for the delay. A judgment was rendered in favor of Sperry for $52,218.01. After the Molers’ motion to reargue was granted, a revised judgment for Sperry in the amount of $43,238.96 was rendered. No prejudgment interest or costs were awarded. The Molers have appealed and Sperry has cross appealed from the revised judgment.
The trial referee found the following facts: Sperry and the Molers entered into a written contract whereby Sperry agreed to construct a residence on the Moler’s land for $65,428. The Molers made a downpayment of $2500, and were to finance the balance by a mortgage at 13.5 percent. The house was to be completed by September 30,1981. Despite two mortgage extensions, the latter being until October 20,1981, the premises were still not completed. On October 20, the house was far from complete and not ready for occupancy. As a result, the Molers lost their mortgage commitment.
The trial referee further found that Sperry had breached the contract and could only recover on the count claiming quantum meruit. In the original award, the trial referee found that Sperry had furnished labor and materials to the Molers in the amount of $68,968.01. The Molers were credited with the down-payment of $2500, plus $14,250, the amount needed to complete the house at the time of the trial. Sperry was awarded the difference of $52,218.01.
The revised judgment credited the Molers with the downpayment of $2500, Sperry’s profit of $11,302, the amount the Molers themselves expended towards completion of the house totaling $11,177.05, and mortgage costs of $750. The award in Sperry’s favor was thus $43,238.96.
*694Both parties have appealed, and the issues entail the opening of the judgment, the failure to award interest and costs, the amount of the judgment, and the theory on which the damage award was based.
Sperry challenges the opening of the original judgment of July 12,1983, and the entry of the revised judgment of October 21, 1983, without any new evidence having been presented. “ ‘Whether proceeding under the common law or a statute, the action of a trial court in granting or refusing an application to open a judgment is, generally, within the judicial discretion of such court, and its action will not be disturbed on appeal unless it clearly appears that the trial court has abused its discretion. See Freccia v. Martin, 163 Conn. 160, 165, 302 A.2d 280 [1972]; Stocking v. Ives, 156 Conn. 70, 72, 238 A.2d 421 [1968]; 46 Am. Jur. 2d, Judgments, § 682.’ ” Hartford Federal Savings & Loan Assn. v. Stage Harbor Corporation, 181 Conn. 141, 143, 434 A.2d 341 (1980); see also 2 Stephenson, Conn. Civ. Proc. (2d Ed.) § 207, pp. 863-64. We find no such abuse of discretion.
Sperry also claims that the trial referee erred in not awarding him interest on the judgment from the date the Molers took occupancy of the premises to the time the judgment was rendered. The allowing of interest as an element of damages is primarily an equitable determination and a matter lying within the discretion of the trial court. Milgrim v. Deluca, 195 Conn. 191, 201, 487 A.2d 522 (1985); State v. Stengel, 192 Conn. 484, 487, 472 A.2d 350 (1984).
“The real question in each case is whether the detention of the money is or is not wrongful under the circumstance.” Cecio Bros., Inc. v. Feldmann, 161 Conn. 265, 275, 287 A.2d 374 (1971). The question basically is “whether the interests of justice require the allowance of interest as damages for the loss of use of *695money. . . . Whether a sum in certain circumstances has been liquidated may, of course, be a useful although not necessarily controlling criterion.” Bertozzi v. McCarthy, 164 Conn. 463, 466-67, 323 A.2d 553 (1973).
Here, the trial referee found that Sperry had failed to fulfill his full contract obligations, that Sperry had ordered a substantial number of extras during the course of construction, and that many of the delays and difficulties were the result of Sperry’s conduct. Under these circumstances, the trial referee could reasonably conclude that the Molers had not wrongfully deprived Sperry of a sum of money. We find no abuse of discretion in the trial referee’s failure to award interest.
Sperry next claims that the trial referee erred in failing to award him costs, and relies on General Statutes § 52-243, which provides: “If a verdict is found on any issue joined in an action in favor of the plaintiff, costs shall be allowed to him, though on some other issue the defendant should be entitled to judgment, unless the court which tried the issue is of the opinion that the defendant had probable cause to plead the matter found against him.” It would appear that the matter of costs under this section is discretionary with the trial referee. See 20 C.J.S., Costs § 11.
The salient issue is the amount of damages to which Sperry is entitled. “As a general rule, in awarding damages upon a breach of contract, the prevailing party is entitled to compensation which will place him in the same position he would have been in had the contract been properly performed.” Levesque v.D & M Builders, Inc., 170 Conn. 177, 180-81, 365 A.2d 1216 (1976); Fuessenich v. DiNardo, 195 Conn. 144, 153, 487 A.2d 514 (1985); Beckman v. Jalich Homes, Inc., 190 Conn. 299, 309, 460 A.2d 488 (1983); Krol v. Goldring, 38 Conn. Sup. 610, 614, 458 A.2d 15 (1982).
*696“Such damages are measured as of the date of the breach. Bachman v. Fortuna, 145 Conn. 191, 194, 141 A.2d 477 [1958]; Lee v. Harris, 85 Conn. 212, 214, 82 A. 186 [1912]; 22 Am. Jur. 2d, Damages, § 52. For a breach of a construction contract involving defective or unfinished construction, damages are measured by computing either ‘(i) the reasonable cost of construction and completion in accordance with the contract, if this is possible and does not involve unreasonable economic waste; or (ii) the difference between the value that the product contracted for would have had and the value of the performance that has been received by the plaintiff, if construction and completion in accordance with the contract would involve unreasonable economic waste.’ Restatement, 1 Contracts § 346 (1) (a), p. 573; see annot., 76 A.L.R.2d 805, 812 § 4.” Levesque v. D & M Builders, Inc., supra, 181; Barnicoat v. Edwards, 1 Conn. App. 652, 654-55, 474 A.2d 808 (1984).
“It is the rule of damages that the reasonable value for which recovery may be had in a suit based on substantial performance of a building contract is to be ascertained with reference to the contract price and by deducting from that price such sums as ought to be allowed for the omissions and variations”; Bruni v. Behnke, 144 Conn. 181, 182-83, 128 A.2d 543 (1956); or “the contract price less the cost to the defendant for completing the work, and payments already made.” Satta v. Buono, 127 Conn. 75, 78, 14 A.2d 718 (1940).
The trial referee applied a quantum meruit figure of $68,968.01, instead of the contract price of $65,428, and there is a discrepancy, or obfuscation as to the amounts expended by the Molers to complete the house.
There is error, the judgment is set aside and the case is remanded with direction to render judgment for *697Sperry to recover such damages against the Molers as he may prove on a new trial limited to the issue of damages.
In this opinion the other judges concurred.