Quadratic Formula Calculator
Copy templates to use them anywhere:
The Quadratic Formula “x=(-b±√(b²-4ac))/(2a)” is used to find the values of x from any quadratic equation, usually in the form “ax²+bx+c=0”. The x values represent the where on the x-axis the curve intersects with.
Quadratic Formula Snippet
a = {formtext: name=a; cols=2; default=2; trim=right} {if: a = 0}{error: a must not equal 0; block=yes; trim=yes}{endif: trim=left} b = {formtext: name=b; cols=2; default=3} c = {formtext: name=c; cols=2; default=-4}
{if: a <> "" and a <> 0 and b <> "" and c <> "" and not iserror(sqrt(b^2 - 4 * a * c)); trim=yes}
{x1=(-b + (sqrt(b^2 - 4 * a * c))) / (2 * a); trim=yes} {x2=(-b - (sqrt(b^2 - 4 * a * c))) / (2 * a); trim=yes}
{if: x1>=x2}{xvalue1=floor(x2) if x2<0 else ceil(x2)}{xvalue2=floor(x1) if x1<0 else ceil(x1)}{else}{xvalue1=floor(x1) if x1<0 else ceil(x1)}{xvalue2=floor(x2) if x2<0 else ceil(x2)}{endif}
{image: https://quickchart.io/chart/chart?width=600&height=300&bkg=transparent&c={ type: 'line', data: { labels:{=seq((xvalue1-{=abs(xvalue1-xvalue2)}), (xvalue2+{=abs(xvalue1-xvalue2)}))}, datasets: [ { label: 'Curve', data: [{=join([a * x^2 + b * x + c for (x) in seq((xvalue1-{=abs(xvalue1-xvalue2)}), (xvalue2+{=abs(xvalue1-xvalue2)}))], ",")}], fill: false, lineTension: 0.41, pointRadius: 0 }, ], }, options: { legend: { display: false, }, }, } }
x = {=x1; format=.3r} or x = {=x2; format=.3r}
{else} {error: please enter valid charaters in the text fields above.} {endif}
This simple Quadratic formula calculator outputs a graph of the curve representing the values entered and the values of x where the curve intersects with the x-axis.