This is an appeal from a judgment entered upon a final accounting between a borrower and lender. The lender, Warde Capital Corporation, challenges the district court’s finding of usury under Idaho’s former usury statute and its decision to apply the statute’s penalty provisions. I.C. §§ 28-22-105, 107 (1979) repealed by 1983 Idaho Sess.Laws, ch. 119, § 2 (1983). As explained below, we hold that the parties’ prejudgment stipulation to apply a nonusurious interest rate on all loans from the time of their inception effectively purged any usury from the transactions. We therefore vacate the judgment and remand the case for a new, final accounting.
I
The relevant facts are undisputed. Warde Capital is a federally licensed small business investment company. Between 1978 and 1988, Warde Capital made a series of loans to John and Georgine Carter, enabling them to purchase and operate a restaurant and bar in Hailey, Idaho. The total amount of the loans exceeded $339,-000. Many of the loans were evidenced by promissory notes executed by the Carters in favor of Warde Capital. The Carters also executed and delivered several deeds of trust to secure the loans. Although the parties discussed charging a variable rate of interest on the loans, the evidence was conflicting as to what agreement, if any, they actually had reached. Between 1980 and 1988, the Carters made irregular payments to Warde Capital totalling approximately $233,000. Warde Capital evidently applied these payments toward the interest owed on loans. The restaurant ultimately failed and in May, 1988, Warde Capital commenced proceedings to foreclose on a deed of trust it held as security for one of the promissory notes. The Carters brought this action to enjoin the foreclosure sale, maintaining that all amounts due on the note had been paid. They also asserted a claim of usury, alleging Warde Capital had violated the since-repealed usury laws by charging a rate of interest in excess of the maximum allowed and by *726compounding the interest.1 Warde Capital, in turn, filed a counterclaim to recover $241,300 in outstanding principal on the twenty-two loans made to the Carters, plus the unpaid interest. The district court issued an order temporarily staying the foreclosure sale pending a determination of the parties’ respective claims.
The proceedings that followed essentially sought an accounting between the parties. Resolution of the central issues required the court to decide the appropriate rate of interest to be charged on each of the more than twenty different transactions since 1978, and also whether Warde Capital had intended to charge a usurious rate of interest on any loans before the repeal of the usury statute in 1983. See I.C. §§ 28-22-105 through 28-22-112 (1979) repealed by 1983 Idaho Sess.Laws, ch. 119, § 2 and I.C. § 28-49-106. Warde Capital contended that, with the exception of a note for $99,-000 it received in 1983 bearing interest at the prime interest rate plus five percent, it had intended to charge the Carters no more than its own “cost of money,” which it described as the prime interest rate plus one percent. The parties acknowledged that the prime rate during the period of the loans was often much higher than thirteen percent. It was undisputed that three of the promissory notes executed prior to 1983 bore an interest rate in excess of thirteen percent — the legal maximum rate under the usury statute.2 These were: a July 15, 1980 note for $100,000, stating a rate of interest at fifteen percent; a December 21, 1981 note for $25,000, with interest at twenty-one percent; and an April 7, 1982 note for $5,000, at twenty percent. It also is undisputed that these three notes, secured in part by deeds of trust on the personal residence of the Carters, were subject to the maximum interest rates set forth in the former usury statute. See I.C. § 28-22-105(a), (b).
During trial, Warde Capital submitted a rate of 11.72 percent as the average prime interest rate between 1978 and the time of trial. Adding one point for its own administrative costs, Warde Capital proposed to calculate interest at a rate of 12.72 percent simple interest on all loan transactions, from the start. At the close of the evidence, but prior to submitting the case for judgment, counsel for the Carters agreed to apply a rate of 12.72 percent simple interest on all the loans. In its memorandum decision, the district judge specifically found that “[t]he parties have now stipulated that simple interest should be applied at the rate of 12.70 [sic] from the beginning.” The court further held, however, that “this stipulation at the time of trial does not affect [Warde Capital’s] violation of the Idaho usury laws at the earlier date,” and found in favor of the Carters on their usury claim. Finding a usurious intent on the part of Warde Capital, the district judge applied the statute’s penalty provisions, I.C. § 28-22-107, and concluded that the Carters were entitled to offset their loan obligations by the amount of the usurious interest charged, plus twice that figure. The court then entered judgment for Warde Capital in the amount of $27,-588.
On appeal, Warde Capital asserts that the parties’ prejudgment stipulation to apply a nonusurious rate of interest on all loans effectively eliminated usury from the transactions, and therefore precluded a subsequent finding of usury. We agree.
*727II
It is well settled in Idaho that a usurious contract may be purged of every taint of usury. Ronen v. Teer, 94 Idaho 811, 812, 498 P.2d 1284, 1285 (1972); Bjornstad v. Perry, 92 Idaho 402, 405, 443 P.2d 999, 1002 (1968); Sanford v. Kunz, 9 Idaho 29, 34, 71 P. 612, 612-13 (1903). A transaction may be purged of its usury where the parties agree to eliminate the usury from the transaction before the issue is submitted for judgment of the court. Ronen, supra; Bjornstad, supra; Sanford, supra. Even if usury has been paid, the refund to and acceptance by the person who paid it, with the agreement that only legal interest will be charged, frees the contract of any taint of usury. Sanford, supra. As recognized by our Supreme Court years ago, parties to a usurious contract are free to cancel the old contract, purge the consideration of usury, and make the original consideration the basis of a new obligation, thereby binding the borrower, in law and in equity, to pay the money received at a legal rate of interest. Sanford, supra.
In this case, before submitting the issue for judgment, the parties clearly and unambiguously agreed to apply a rate of 12.72 percent to all of the loan transactions from the time of their inception, thereby cancelling whatever interest rate was initially provided for in the various contracts. Any usury tainting the original contracts was thus purged from those transactions. The Carters admit to the stipulation but argue that, because they never expressly intended to waive their right to assert a claim of usury, the transactions’ original usury somehow remains actionable. This argument is incorrect. As the case law makes clear, a.party’s intent to purge a contract of its usury does not require that he intend to waive a claim of usury. Rather, the question is whether the parties intentionally eliminated usury from their transaction. Moreover, as stated in Ronen, supra, it is not necessary that the new contract be entered for the express purpose of purging the first transaction of usury. By agreeing to simple interest at a rate of less than thirteen percent on all loans, the Carters and Warde Capital unequivocally eliminated the unlawful interest necessary to sustain a claim of usury. Accordingly, the district court’s finding of usury was in error and is reversed.
Conclusion
We conclude that the parties’ prejudgment stipulation to a nonusurious rate of interest on all loan contracts purged the original transactions of any usury. The district court’s finding of usury accordingly is reversed. We vacate the judgment and remand the case for a new accounting consistent with this decision.
Costs to appellant, Warde Capital Corporation. Warde Capital is also entitled to an award of reasonable attorney fees, pursuant to the terms of the promissory notes, in an amount to be determined in accordance with I.A.R. 40 and 41.
SWANSTROM, J., concurs.. The Carters alternatively alleged that the parties’ transactions were made pursuant to a joint venture agreement, and consequently Warde Capital was entitled to recover only from the profits of the business enterprise. The district court rejected this claim as unsupported by the evidence. That decision is not challenged on this appeal.
. Idaho Code § 28-22-105 set a maximum rate of interest at thirteen percent per annum. It provided, however, that, except where the contract is secured by the borrower’s personal residence, a contract that is (a) not a consumer loan, and (b) for $25,000 or more, the parties may agree in writing to a greater rate of interest, and that a claim of usury by the borrower was prohibited. See I.C. § 28-22-105 (1979) repealed by 1983 Idaho Sess.Laws, ch. 119, § 2 and I.C. § 28-49-106.
The loans made in this case clearly were not consumer loans. Thus, loan contracts of $25,-000 or more are exempt from the statute’s maximum rate, unless secured by the Carter’s personal residence.