Loading the page...
Preparing tools and content for you. This usually takes a second.
Preparing tools and content for you. This usually takes a second.
Fetching calculator categories and tools for this section.
Free Lagrange multiplier calculator. Solve constrained optimization problems, find maxima and minima with equality constraints using multivariable calculus. Our calculator uses the Lagrange multiplier method where ∇f = λ∇g to find optimal points subject to constraints in two or three variables.
Last updated: February 2, 2026
Need a custom optimization calculator for your educational platform? Get a Quote
Choose a sample optimization problem
Problem:
Objective: f(x,y) = xy
Constraint: x + y = 10
Goal: Find maximum
Critical Point:
(5, 5)
Optimal solution point
Maximum Value:
25
f at the critical point
Lagrange Multiplier (λ):
5
Rate of change of optimal value
Method:
Solution Steps:
Lagrange Multiplier Method:
Method
∇f = λ∇g
Find extrema on constraint curves/surfaces
Formula
L = f - λg
Combine objective and constraint
Condition
∇L = 0
Gradients are parallel at optimum
System
n + 1 equations
Solve for variables and λ
Variables
2, 3, or more
Handle functions of multiple variables
Interpretation
λ = Shadow Price
Marginal value of relaxing constraint
Maximize f(x,y) = xy subject to x + y = 10
Critical Point
(5, 5)
Maximum
25
λ value
5
The Lagrange multiplier method finds optimal values of a function subject to constraints by converting the constrained problem into an unconstrained one. The key insight is that at an optimal point, the gradient of the objective function must be parallel to the gradient of the constraint.
Lagrange Function:
L(x, y, λ) = f(x, y) - λg(x, y)Where g(x,y) = c is the constraint
Optimality Conditions:
∂L/∂x = ∂f/∂x - λ∂g/∂x = 0∂L/∂y = ∂f/∂y - λ∂g/∂y = 0∂L/∂λ = -g(x, y) = 0Geometric Interpretation:
∇f(x,y) = λ∇g(x,y)Gradients are parallel at optimal point
The method works because at an optimal point on the constraint curve, you can't improve the objective function by moving along the constraint. This happens when the level curves of f are tangent to the constraint curve, which occurs when their gradients are parallel.
The Lagrange multiplier theorem states that if f and g are continuously differentiable and ∇g ≠ 0 at a constrained extremum, then ∇f = λ∇g for some scalar λ. This transforms the constrained optimization problem into solving a system of equations. The multiplier λ has practical interpretation as the marginal rate of change of the optimal value with respect to the constraint.
Need other optimization tools? Check out our optimization calculator and derivative calculator.
Get Custom Calculator for Your PlatformSolution: (x, y) = (5, 5), Maximum = 25, λ = 5
The product xy is maximized when both numbers are equal (x = y = 5).
Minimize x² + y² subject to x + 2y = 5
Solution: (1, 2), Minimum = 5, λ = 2
Maximize xyz subject to x + y + z = 12
Solution: (4, 4, 4), Maximum = 64
Share it with others who need help with constrained optimization
Suggested hashtags: #Calculus #Optimization #LagrangeMultipliers #Mathematics #Calculator