Use this free optimization calculator for quadratic functions: enter a, b and c to find the maximum or minimum value and the exact x where it occurs.

Optimization Calculator

Find the peak or the trough of any quadratic model — and the exact input level that gets you there.

Free to use Max and min Optimal x shown Save PDF · PNG · Share

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for coefficient a (x squared).

Must be non-zero; negative a gives a maximum.

Enter a valid value for coefficient b (x).

Linear coefficient.

Enter a valid value for constant c.

Constant term.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Optimization Calculator tinyexe.comFree online calculators

TinyExe · Optimization Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Coefficient a (x squared)

—

Coefficient b (x)

—

Constant c

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Optimization Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      To optimise a quadratic function a x squared plus b x plus c, calculate x equals minus b divided by two a, then evaluate the function at that x. For negative one x squared plus four x, the optimum x is two and the maximum value is four.

      • Optimal x = -b / (2a), the vertex of the parabola
      • a < 0 means the vertex is a maximum; a > 0 a minimum
      • A quadratic has exactly one turning point, which is the global optimum

      Vertex quick reference

      Reference values for this calculator.

      a signOpensVertex isExample use
      a > 0UpwardsMinimumCost curves
      a < 0DownwardsMaximumRevenue / projectile height

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      For f(x) = a x^2 + b x + c: optimal x = -b / (2a); optimum value = f(-b / 2a). a < 0 gives a maximum, a > 0 a minimum

      Ideas enhancement: honestly scoped to the classic single-variable quadratic case — the most common textbook and business optimisation problem (profit, area, projectile height) — and reports the optimum location, type and axis, not just the value.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      Maximum revenue shape

      a -1, b 4, c 0

      CalculationSteps
      x = -4 / (2 x -1) = 2. f(2) = -4 + 8 + 0 = 4.Maximum value 4 at x = 2.

      Result

      Example 2

      Minimum cost shape

      a 2, b -8, c 3

      CalculationSteps
      x = 8 / 4 = 2. f(2) = 8 - 16 + 3 = -5.Minimum value -5 at x = 2.

      Result

      Example 3

      Symmetric edge case

      a 1, b 0, c 0

      CalculationSteps
      x = 0 / 2 = 0. f(0) = 0.Minimum value 0 at x = 0.

      Result

      How to use this calculator

      Step 1

      Write your problem as f(x) = a x^2 + b x + c and note the three coefficients.

      Step 2

      Enter a, b and c — a must not be zero.

      Step 3

      Read the optimum value as the headline result.

      Step 4

      Check the Optimal x detail: that is the input level that achieves it.

      Step 5

      Sanity-check by evaluating the function slightly either side of the optimal x.

      In short: Quadratic optimisation finds the largest or smallest value of a parabola-shaped model and the input that produces it.

      Frequently asked questions

      What problems does this solve?

      Single-variable quadratic optimisation: maximum revenue or profit, minimum cost, largest area with fixed perimeter, and peak height of a projectile, once the model is written as a x^2 + b x + c.

      Why is the answer at -b/2a?

      That is the x-coordinate of the parabola vertex — the axis of symmetry — where the derivative 2ax + b equals zero, so the function stops rising or falling there.

      What if a is zero?

      Then the function is a straight line, which has no finite optimum: it rises or falls forever. The calculator asks for a non-zero a for exactly that reason.

      Can it handle constraints like x between 0 and 10?

      Not directly. If the vertex x falls outside your allowed range, the constrained optimum is whichever endpoint is closer in value — evaluate both endpoints with the same formula.

      Maximum or minimum — how do I know?

      The sign of a decides: a negative a opens the parabola downward (vertex is a maximum); a positive a opens it upward (vertex is a minimum).

      About this calculator

      An optimization calculator finds the best possible value of a model — here, the maximum or minimum of a quadratic function f(x) = a x^2 + b x + c — and the input x that achieves it.

      Many first optimisation models are parabolas: revenue rises with price until demand falls away, cost dips at an efficient batch size then climbs, and a thrown ball follows a downward arc. Each of those has exactly one turning point, and that turning point is the answer to the optimisation question.

      The vertex formula x = -b/(2a) locates the turning point directly from the coefficients, with no graphing or trial and error. Substituting that x back into the function gives the optimum value. Checking the function a little either side of the vertex is a good habit: both neighbours must be worse, or an arithmetic slip has crept in.

      Use it for textbook optimisation problems and real quadratic models: pricing for maximum revenue, batch size for minimum cost, fence layout for maximum area, or peak height in projectile motion.

      How to calculate it yourself

      Step 1

      Model the problem as f(x) = a x^2 + b x + c.

      Step 2

      Compute x = -b / (2a).

      Step 3

      Substitute that x into f to get the optimum value.

      Step 4

      Use the sign of a to label it maximum or minimum.

      Step 5

      Optionally test x one unit either side to confirm both are worse.

      Real-life examples

      Pricing a workshop seat

      A trainer models daily profit as -2x^2 + 120x - 800, where x is the ticket price in dollars.

      Optimal x = -120 / (2 x -2) = 30. Profit = -2(900) + 3,600 - 800 = 1,000.

      Pricing at $30 maximises daily profit at $1,000 on this model.

      Fencing a rectangular pen

      With 40 m of fence against a wall, area works out as A = -2x^2 + 40x for pen width x.

      Optimal x = -40 / -4 = 10. Area = -200 + 400 = 200.

      A 10 m width gives the largest area, 200 square metres.

      Ideas & use cases

      • Compare scenarios by changing only c (fixed costs): the optimal x does not move, but the optimum value shifts by exactly the change in c.
      • Test sensitivity: rerun with a 10% different b to see how much the optimal decision, not just the value, moves.
      • Use the endpoint rule from the FAQs when x is capped (budget, capacity, legal maximum) and the vertex sits beyond the cap.

      Limitations & sources

      • Single-variable quadratics only. It does not solve linear programming, multi-variable, constrained or non-quadratic optimisation; endpoint checks for bounded ranges are described in the FAQs.

      Sources: Vertex formula x = -b/(2a) from standard algebra (OpenStax College Algebra, quadratic functions chapter)

      Optimization Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results