Calculator Inputs
Formula Used
Utility: U = f(x, y)
Marginal utility of X: MUx = ∂U / ∂x
Marginal utility of Y: MUy = ∂U / ∂y
Marginal Rate of Substitution: MRSxy = MUx / MUy
Indifference curve slope: dy / dx = -MUx / MUy
Consumer optimum comparison: MRSxy = Px / Py
How to Use This Calculator
- Enter a utility function using x and y as goods.
- Enter the current quantity of each good.
- Keep the derivative step small for smooth functions.
- Add prices if you want an optimum comparison.
- Press the calculate button.
- Review MUx, MUy, MRS, slope, graph, and trade estimate.
- Use CSV or PDF buttons to save the result.
Example Data Table
| Utility Function | x | y | Known MRS Pattern | Use Case |
|---|---|---|---|---|
x^0.5*y^0.5 |
16 | 9 | y / x | Balanced Cobb-Douglas preferences. |
x^0.3*y^0.7 |
20 | 12 | (0.3 / 0.7) × y / x | Good Y has stronger weight. |
2*ln(x)+3*ln(y) |
10 | 15 | (2 / x) ÷ (3 / y) | Log utility and diminishing marginal utility. |
sqrt(x)+sqrt(y) |
25 | 9 | MU ratio from square-root terms | Separate but concave utilities. |
Understanding MRS From a Utility Function
What MRS Means
The marginal rate of substitution shows how much of good Y a consumer may give up for one more unit of good X. It keeps utility nearly unchanged. The value comes from marginal utilities. MUx measures the extra satisfaction from a tiny increase in X. MUy does the same for Y. Their ratio gives the local trade-off.
Why the Utility Function Matters
A utility function describes preference strength. Cobb-Douglas, logarithmic, linear, and square-root forms can show different tastes. Some functions create smooth curved indifference lines. Others create straight or kinked patterns. This tool uses numerical derivatives. That makes it useful when the expression is hard to solve by hand.
Reading the Result
A high MRS means good X is valuable at the current bundle. The consumer may be willing to sacrifice more Y for X. A low MRS means Y is relatively more important. The signed slope is negative because an indifference curve usually slopes downward. More X needs less Y to keep the same satisfaction level.
Using Prices
The price ratio adds economic meaning. In a simple consumer choice model, the best interior bundle occurs when MRS equals Px divided by Py. If MRS is larger than the price ratio, X gives strong marginal value compared with its cost. If MRS is smaller, Y may be preferred at the margin.
Graph and Exports
The graph estimates the indifference curve through your chosen point. The tangent line shows the local slope. Exports help you keep records for assignments, reports, or classroom examples. Use smooth positive functions for the clearest graphs and stable marginal estimates.
FAQs
1. What is MRS?
MRS is the marginal rate of substitution. It shows how much of good Y a consumer may exchange for one extra unit of good X while keeping utility nearly constant.
2. Which variables should I use?
Use x for good X and y for good Y. The calculator reads these variables inside the utility function and evaluates the result at your selected bundle.
3. Can I use logarithms?
Yes. You can use ln(x) for natural logarithm. You can also use log(x), sqrt(x), exp(x), powers, and common arithmetic operators.
4. Why is the slope negative?
The indifference curve slope is negative because gaining more of one good usually means giving up some of the other good to keep utility unchanged.
5. What does MUx mean?
MUx means marginal utility of X. It estimates the extra utility gained from a very small increase in X while holding Y constant.
6. What does MUy mean?
MUy means marginal utility of Y. It estimates the extra utility gained from a very small increase in Y while holding X constant.
7. What is the price ratio check?
The price ratio check compares MRS with Px divided by Py. In many consumer choice models, an interior optimum occurs when both values are equal.
8. Why can errors happen?
Errors can occur when the expression has invalid syntax, division by zero, negative logarithm inputs, or unsupported variables. Use valid x and y expressions.