MrExcel Publishing
Your One Stop for Excel Tips & Solutions

excel graphs--area under curve

Posted by Rachel on October 12, 2001 10:05 AM

Does anyone know how to calculate (using the software,
not by hand) a way to calculate the area under a curve
in excel? My TA said that it could be done, but he
didn't know how.

Posted by Dan on October 12, 2001 10:32 AM

I'm pretty sure that there is not built in function in Excel to do this. However if you do a search on the internet you might find add-ins or VB code for Excel that will do this for you. I don't know the math behind it so I wouldn't know where to begin to write the code.

Posted by Damon Ostrander on October 14, 2001 10:43 PM

Hi Rachel,

It is not difficult to write a VBA routine that would calculate the area under a chart's curve. It would have to be done numerically, rather than analytically, however. This means that Excel would have to use the trapezoidal or similar rule for numerically integrating under the series curve on the chart, basically approximating the function with straight line segments or simple curves. If you want Excel to give the EXACT answer for the area under a curve that Excel is calculating using a continuous analytic expression, you will be disappointed since Excel knows nothing of calculus or symbolic math.

Trapezoidal integration is simple--you can check it out in almost any calculus or numerical analysis book. To use it you will need to access the curve's point data, which is accessible via the Series' Point object of the chart.

I hope this helps.