Notice: Undefined variable: alid in /home/u294241901/domains/codingace.net/public_html/header.php on line 67

Utility Maximization Calculator

Maximize satisfaction with clear stepwise math outputs. Choose a model, set prices, and budget instantly. See optimal choices, utility level, and constraint balance now.

Meta: Compute optimal bundles for two goods under budgets. Model preferences using standard utility forms. Visualize curves, compare solutions, and export results quickly today.

Inputs
Set preferences, prices, and budget
All fields marked * are required.
All models assume two goods and a single budget constraint.
Total spending capacity in the same currency as prices.
α between 0 and 1; higher α favors Good X.
Used only for CES; σ≈1 behaves like Cobb-Douglas.
Reset
Example data
Sample inputs and expected pattern
Model M Px Py α σ Expected optimum (X*, Y*)
Cobb-Douglas 100 5 10 0.60 (12, 4)
CES 100 5 10 0.60 2.00 More substitution toward the cheaper good
Perfect Substitutes 100 5 10 0.60 Likely corner: mostly Good X here
Perfect Complements 100 5 10 0.60 Fixed proportion bundle along a kink

Tip: Use the plot to verify the indifference curve touches the budget line at the computed optimum.

Formula used
Two-good maximization under a budget
Budget constraint
Px·x + Py·y = M
Feasible bundles lie on or below the budget line.
First-order condition intuition
MRS = MUx / MUy ≈ Px / Py
At an interior optimum, the indifference curve is tangent to the budget line.

Cobb-Douglas
U = x^α · y^(1−α)
x* = αM/Px, y* = (1−α)M/Py
Shares of spending are constant: α on X and 1−α on Y.
CES
U = [αx^p + (1−α)y^p]^(1/p), p=(σ−1)/σ
Spend share uses α^σ·P^(1−σ)
Higher σ means easier substitution between goods.
Perfect Substitutes
U = αx + (1−α)y
Choose all X if α/Px > (1−α)/Py
If value-per-cost is equal, many optimal bundles exist.
Perfect Complements
U = min(x/α, y/(1−α))
x:y fixed at α:(1−α)
Optimal bundle sits at the kink where proportions match.
How to use
Run the calculator step by step
  1. Pick a utility model that matches your preference story.
  2. Enter income (M) and the prices Px and Py.
  3. Set α to tilt preference toward Good X or Good Y.
  4. If you choose CES, also set σ to control substitution strength.
  5. Click Maximize Utility to compute the optimum.
  6. Use the plot to see tangency or corner behavior visually.
  7. Download CSV or PDF to save your result for notes.

Budget set and feasible choices

The calculator treats every bundle (x,y) as feasible when Px·x + Py·y ≤ M. With M=100, Px=5, and Py=10, the intercepts are x=20 and y=10, so the budget line slope is −Px/Py = −0.5. Any point below that line is affordable, but only points on the line exhaust income.

Preference weight and economic meaning

The weight α shifts attention toward Good X. Under Cobb‑Douglas, spending shares are constant: α of income to X and (1−α) to Y. For α=0.60 and the example prices, spending on X is 60, giving x*=12, and spending on Y is 40, giving y*=4. These values help users validate inputs quickly.

How elasticity changes substitution

CES adds σ to control substitution. When σ rises, the consumer substitutes toward the cheaper good more aggressively. With the same M, Px, Py, and α, moving from σ=0.7 to σ=2.0 increases the share allocated to X because Px<Py. When σ approaches 1, the solution converges smoothly to Cobb‑Douglas.

Corner versus tangency outcomes

Perfect substitutes compare utility per currency unit: α/Px versus (1−α)/Py. If α/Px is larger, the optimum is a corner at y*=0 with x*=M/Px. If the ratios are equal, many optima exist along the budget line; the tool reports an even split to produce a single reproducible bundle.

Kinked demand under complements

Perfect complements force fixed proportions x:y = α:(1−α). The optimum occurs at the kink where both “needs” are met together. For α=0.60, the ratio is 0.60:0.40, so y = (2/3)x. The chosen bundle keeps that ratio while satisfying the budget.

Interpreting the plot and exports

The graph overlays the budget line, an indifference curve at U*, and the optimal point. A tangent indicates interior optimality; a visible corner indicates linear preferences. For example, if Px increases from 5 to 8 with M fixed at 100, the budget intercept on x falls from 20 to 12.5, and Cobb‑Douglas demand becomes x*=αM/Px=7.5 while y* remains (1−α)M/Py=4. Exported CSV and PDF record parameters, bundle, utility, and slack, supporting audit trails, classroom assignments, and scenario comparison across different price shocks. Use this to test tax, subsidy, or inflation cases, and confirm that total spending equals M within rounding, and document each run for later review.

FAQs

1) What does the calculator maximize?
It chooses the bundle (x,y) that gives the highest utility value while respecting Px·x + Py·y ≤ M, using your selected preference model and parameters.

2) Why do I sometimes get a corner solution?
With perfect substitutes, the best “utility per cost” can favor one good strongly. Then all spending goes to that good, so the optimum sits on an axis rather than a tangency point.

3) What does α represent?
α is a preference weight between 0 and 1. Larger α increases the importance of Good X in the utility function, shifting the optimal allocation toward X for most models.

4) When should I use σ in CES?
Use σ when you want adjustable substitution. Higher σ means easier substitution between goods. Values near 1 behave like Cobb‑Douglas, while lower values imply stronger complement-like behavior.

5) Why does the budget slack differ slightly from zero?
Small slack can appear due to rounding and numerical approximations. The computed bundle is designed to satisfy the constraint closely, and the “Spent” and “Slack” figures help you verify precision.

6) What does the plot show?
It draws the budget line, an indifference curve at the computed utility level, and the optimal point. Tangency suggests an interior optimum; a visible corner indicates a boundary optimum.

Related Calculators

gradient descent calculatorfeasible region finderlearning rate optimizer

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.