Calculate the Marginal Rate of Substitution

.mrs-calculator-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e1e1e1; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 15px rgba(0,0,0,0.05); color: #333; } .mrs-calculator-container h2 { color: #2c3e50; margin-top: 0; border-bottom: 2px solid #3498db; padding-bottom: 10px; } .mrs-input-group { margin-bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; } .mrs-field { display: flex; flex-direction: column; } .mrs-field label { font-weight: 600; margin-bottom: 8px; font-size: 14px; color: #555; } .mrs-field input { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; } .mrs-btn { background-color: #3498db; color: white; padding: 15px 25px; border: none; border-radius: 6px; cursor: pointer; font-size: 18px; font-weight: bold; width: 100%; transition: background-color 0.3s; } .mrs-btn:hover { background-color: #2980b9; } #mrs-result-box { margin-top: 25px; padding: 20px; background-color: #f8f9fa; border-radius: 8px; border-left: 5px solid #3498db; display: none; } .mrs-result-value { font-size: 24px; color: #2c3e50; font-weight: 800; } .mrs-explanation { line-height: 1.6; color: #444; margin-top: 30px; } .mrs-explanation h3 { color: #2c3e50; margin-top: 25px; } .mrs-table { width: 100%; border-collapse: collapse; margin: 15px 0; } .mrs-table th, .mrs-table td { border: 1px solid #ddd; padding: 12px; text-align: left; } .mrs-table th { background-color: #f2f2f2; } @media (max-width: 600px) { .mrs-input-group { grid-template-columns: 1fr; } }

Marginal Rate of Substitution (MRS) Calculator

Calculate the rate at which a consumer is willing to give up one good (Good Y) in exchange for another good (Good X) while maintaining the same level of utility.

The Marginal Rate of Substitution (MRSxy) is:

What is the Marginal Rate of Substitution?

In economics, the Marginal Rate of Substitution (MRS) is the amount of a good that a consumer is willing to give up for another good, as long as the new good is equally satisfying. It is used in consumer theory to analyze consumer behavior and is represented by the slope of the indifference curve.

The MRS Formula

The standard formula for calculating MRS between two points on an indifference curve is:

MRSxy = – (ΔY / ΔX)

Where:

  • ΔY: The change in the quantity of Good Y (New Y – Initial Y).
  • ΔX: The change in the quantity of Good X (New X – Initial X).

Note: MRS is typically expressed as an absolute value because it represents a tradeoff.

Example Calculation

Suppose a consumer is currently consuming 10 units of Good Y (e.g., Clothing) and 2 units of Good X (e.g., Food). They are willing to move to a consumption bundle of 7 units of Good Y and 3 units of Good X while remaining equally happy.

Variable Value
Initial Good X (X1) 2
New Good X (X2) 3
Initial Good Y (Y1) 10
New Good Y (Y2) 7
ΔX (3 – 2) 1
ΔY (7 – 10) -3
MRS (-ΔY / ΔX) 3.0

In this example, the MRS is 3, meaning the consumer is willing to give up 3 units of Good Y to obtain 1 additional unit of Good X.

Why MRS Matters

Understanding the MRS helps economists and businesses understand preferences. As a consumer obtains more of Good X, they are generally willing to give up less of Good Y to get even more of X. This is known as the Diminishing Marginal Rate of Substitution, which explains why indifference curves are typically convex to the origin.

function calculateMRS() { var x1 = parseFloat(document.getElementById('mrs_qX1').value); var x2 = parseFloat(document.getElementById('mrs_qX2').value); var y1 = parseFloat(document.getElementById('mrs_qY1').value); var y2 = parseFloat(document.getElementById('mrs_qY2').value); var resultBox = document.getElementById('mrs-result-box'); var valueDisplay = document.getElementById('mrs-value-display'); var interpretation = document.getElementById('mrs-interpretation'); if (isNaN(x1) || isNaN(x2) || isNaN(y1) || isNaN(y2)) { alert("Please enter valid numbers for all fields."); return; } var deltaX = x2 – x1; var deltaY = y2 – y1; if (deltaX === 0) { valueDisplay.innerHTML = "Undefined"; interpretation.innerHTML = "Change in X cannot be zero."; resultBox.style.display = 'block'; return; } // MRS is typically the absolute value of the slope var mrs = Math.abs(deltaY / deltaX); valueDisplay.innerHTML = mrs.toFixed(2); var text = "The consumer is willing to substitute " + mrs.toFixed(2) + " units of Good Y for 1 unit of Good X to maintain the same level of utility."; interpretation.innerHTML = text; resultBox.style.display = 'block'; }

Leave a Comment