This is an appeal from a summary judgment enforcing a settlement agreement. We affirm the judgment.
Hastings Pork commenced an action against Johanneson and Olson seeking to recover $157,812.50 plus interest. The basis for the claim was not discussed. Before the case could come to trial, the parties entered into a settlement agreement1 which provid*804ed for procedures whereby Johanneson and Olson were to convey mineral interests having an aggregate fair market value of $200,000 to Hastings and, in return, Hastings agreed to dismiss the lawsuit. The settlement agreement further provided that if Johanneson and Olson failed to comply with the terms of the agreement, Hastings would be entitled to a judgment for the full amount of damages prayed for in the complaint and Hastings would execute a quit claim deed to any interest it had in capital stock of Classic Mining Corp. of Salt Lake City, Utah. A stipulation was subsequently signed by the attorneys for the parties and filed with the court in which it was agreed to postpone the trial to give the parties time to comply with the provisions of the agreement. The stipulation also provided that if Johanneson and Olson failed to comply with the provisions of the settlement agreement, judgment would be entered against them for the amount sought by Hastings in its complaint.
In accordance with the provisions of the settlement agreement, an appraiser was selected. Johanneson and Olson submitted a list of mineral interests to the appraiser who determined the maximum value of these interests to be $23,865. Pursuant to paragraph number 6 of the settlement agreement, because the appraised value of the minerals was less than $200,000, Johan-neson and Olson provided an additional listing’ of mineral interests within 15 days. The appraiser determined the maximum value of the additional mineral interests to be $20,000.
Hastings subsequently moved for entry of judgment alleging that Johanneson and Olson had failed to comply with the terms and conditions of the settlement agreement. Further attempts by Johanneson and Olson to tender additional mineral interests were rejected by Hastings. Following a hearing on the motion for entry of judgment, the district court issued a memorandum opinion. The court determined that Johanneson and Olson had breached the settlement agreement by failing to provide Hastings with a listing of additional mineral interests of sufficient value within 15 days after receiving notification that the appraised value of the interests initially offered was less than $200,000. Treating Hastings’ motion for entry of judgment both as a motion for entry of judgment and as a motion for summary judgment,2 the court concluded that no genuine issues of material fact existed and granted judgment in favor of Hastings, according to the terms of the settlement agreement, for the full amount of damages prayed for in the complaint. Judgment was entered accordingly3 and *805from that judgment Johanneson and Olson appeal.
The only issue on appeal is whether or not the district court erred in granting judgment for Hastings.
Summary judgment will be entered if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to judgment as a matter of law. Keller v. Hummel, 334 N.W.2d 200 (N.D.1983); Rule 56(c), NDRCivP. On appeal from a summary judgment, this court must view the evidence in a light most favorable to the party against whom the summary judgment was granted and we may only determine if a genuine issue of fact exists and if the law was applied correctly. Benson Cty. Co-op., Etc. v. Central Livestock, 300 N.W.2d 236 (N.D.1980). Summary judgment is not appropriate if it appears from the record that there is an unresolved issue of material fact. Nor is summary judgment appropriate if the moving party is not entitled to judgment as a matter of law, or if reasonable differences of opinion exist as to the inference to be drawn from undisputed facts. Keller v. Hummel, supra.
Johanneson and Olson argue that summary judgment was inappropriate in the instant case. They claim that the court erred when it interpreted paragraph number 6 of the settlement agreement4 and erred in concluding that Johanneson and Olson had breached the agreement by failing to provide Hastings with a listing of mineral interests totaling $200,000 in value within 15 days following notification that the market value of the mineral interests initially offered was less than $200,000. Johanneson and Olson contend that paragraph number 6 does not specify what is to happen in the event the second listing does not bring the aggregate fair market value of the mineral interests up to $200,000. They argue that a reasonable inference can be drawn which would permit them to submit additional mineral interests to Hastings, provided that such interests are submitted in good faith and within a reasonable time after the second mineral interest listing. We do not agree.
The settlement agreement signed by the parties was, in essence, a contract entered into in an attempt to settle the lawsuit which Hastings had commenced against Johanneson and Olson. Parties may contract to settle a controversy between them. Swan v. Great Northern Ry. Co., 40 N.D. 258, 266, 168 N.W. 657, 658 (1918). This court has expressed approval of compromise and settlement agreements fairly entered into between parties. Thomas C. Roel Associates, Inc. v. Henrikson, 295 N.W.2d 136, 137 (N.D.1980); Bohlman v. Big River Oil Company, 124 N.W.2d 835, 837 (N.D.1963). Because litigation is considered injurious to society, McGlynn v. Scott, 4 N.D. 18, 21, 58 N.W. 460, 461 (1894), compromises which diminish litigation and promote a peaceful society are favored. Swan, supra, 40 N.D. at 270, 168 N.W. at 660.
When a settlement agreement is fairly entered into, it disposes of all disputed matters. Roel Associates, supra, 295 N.W.2d at 137; Bohlman, supra, 124 N.W.2d at 837. In the absence of fraud, duress, or another equitable defense, a settlement agreement operates as a merger, barring recovery on the original claim. Production Credit Association of Minot v. Geving, 218 N.W.2d 185, 194 (N.D.1974); Bohlman, supra, 124 N.W.2d at 837; Swan, supra, 40 N.D. at 266, 168 N.W. at 658. A settlement agreement is a final determination upon the merits which should be upheld regardless of the merits of the original controversy. Bohlman, supra, 124 N.W.2d at 839.
*806A settlement agreement is a contract which either party may enforce; the rights and responsibilities of the parties are limited by the terms of the agreement. Production Credit, supra, 218 N.W.2d at 194-95. Both parties agreed to the terms of the settlement in the instant case.
The construction of a written contract to determine its legal effect is a question of law for the court to decide. The determination of whether or not a contract is ambiguous is also a question of law for the court to decide. Sorlie v. Ness, 323 N.W.2d 841 (N.D.1982). When a contract is reduced to writing, the intention of the parties is to be ascertained from the writing alone if possible. Section 9-07-04, NDCC. If the parties’ intentions can be ascertained from the writing alone, without reference to extrinsic evidence, then the interpretation of the contract is entirely a question of law, and this court will independently examine and construe the contract to determine whether or not the district court erred in its interpretation of it. Sorlie v. Ness, supra.
We conclude that the district court did not err in either its interpretation of the agreement -or in its conclusion that Johanneson and Olson breached the agreement. When Johanneson and Olson failed to tender mineral interests valued at $200,000 according to the terms of the settlement agreement they were in breach and, pursuant to paragraph number 1 of the agreement, Hastings became entitled to a judgment for the full amount of damages claimed in the complaint. There being no remaining issues of material fact, the district court appropriately summarily granted judgment according to the terms of the settlement agreement.
Although the judgment does not require Hastings to quit claim to Johanneson and Olson all interest Hastings may have in the stock of Classic Mining Corp., the agreement requires it upon collection of the judgment.
The judgment is affirmed.
ERICKSTAD, C.J., and SAND and PAULSON, JJ., concur.. The settlement agreement provided, in part:
“In consideration of the mutual covenants and undertakings set forth herein, the parties hereto hereby agree as follows:
“1. If Johanneson and Olson shall convey by deed to Hastings mineral interests with an aggregate fair market value of $200,000 within the time periods hereinafter set forth and in accordance with the procedures hereinafter set forth, including the appraisal procedures, then Hastings shall provide Johanne-son and Olson with a complete release of all claims made by Hastings in the aforesaid lawsuit (and agree to dismiss the lawsuit with prejudice), together with a quit claim deed to any interest Hastings may have in the capital stock of Classic Mining Corp. of Salt Lake City, Utah. If Johanneson and Olson do not convey to Hastings mineral interests with an aggregate fair market value of $200,000 in accordance with the aforesaid procedures, then they agree that Hastings shall be entitled to a judgment in the aforesaid lawsuit for the full amount of damages claimed by Hastings. In the latter event, upon collection of the judgment, Hastings shall quit claim to Johanneson and Olson all interest Hastings may have in the aforesaid stock of Classic Mining Corp.
“3. Within 7 days after the date hereof Johanneson and Olson shall provide Hastings with an inventory listing mineral interests they propose to convey to Hastings, which interests Johanneson and Olson shall in good faith believe have an aggregate fair market value of $200,000.
“4. Within 7 days after receipt of the aforesaid inventory, Hastings shall provide Johanneson and Olson with the names of 3 registered geologists or petroleum engineers willing to act as appraisers of the inventoried mineral interests, each of whom shall have general familiarity with mineral interests in the vicinity of the inventoried mineral interests. The three shall have had no previous business dealings with either Hastings or Jo-hanneson and Olson. Thereafter Johanneson and Olson shall have 5 days within which to choose one of the three potential appraisers from the list. The cost of the appraisal shall be borne by Johanneson and Olson.
“6. The appraiser shall determine the fair market value of the inventoried mineral interests as soon as practicable, after which he shall notify the parties hereto of his appraisal. If the appraised value is in excess of $200,000, then Hastings will within 15 days of such notification choose from the invento*804ried mineral interests ones which equal $200,000. If the appraised value is less than $200,000, Johanneson and Olson, within 15 days of such notification, shall provide Hastings with a listing of additional mineral interests in order to bring the aggregate fair market value up to $200,000. The fair market value of such additional mineral interests shall be determined by the same appraiser as soon as practicable, after which he shall notify the parties of his determination.
“7. The parties hereto agree the fair market value determined by the appraiser shall not be challenged by any of them on any basis.”
. The parties do not allege on appeal that the court erred in treating Hastings’ motion for entry of judgment as a motion for summary judgment.
. The complaint prayed for damages in the amount of $157,812.50 plus interest calculated from July 27, 1979, at the rate of two percent above the prime rate of the First National Bank of Denver. The judgment awarded damages in the amount of $257,166.00 plus interest accruing at the rate of $56.21 per day from February 1, 1983. Johanneson and Olson argue that the record is not sufficient to enable the district court to calculate the exact amount of interest. Hastings contends that interest was calculated as prayed for in the complaint and inserted in the prepared judgment. Hastings also points out that Johanneson and Olson made no objections to the proposed order for judgment even though the district court afforded them an opportunity to do so.
The record on appeal does not include the calculations used to arrive at the interest figure contained in the judgment. The record also fails to reveal the prime rate of interest at the First National Bank of Denver on July 27, 1979. Accordingly, it is impossible for us to determine whether the interest on the judgment was calculated correctly. However, this does not affect our ability to decide the issue raised on appeal, i.e., whether the district court erred in granting judgment in favor of Hastings accord*805ing to the terms of the settlement agreement. It is clear that the district court intended to grant judgment as prayed for in the complaint. If the interest on the judgment was calculated incorrectly, this would be a mistake of a clerical nature which could be corrected by a nunc pro tunc order. See Coulter v. Coulter, 328 N.W.2d 232, 238-39 (N.D.1982).
. See footnote 1.