Crutschow is giving you good advice on how this problem is solved, not a magic bullet.
That program also only works with square or exponential waveforms. A gaussian pulse is also common, but if you try to use a square wave or exponential as a model for, say, something approaching a Dirac delta impulse you could be off by a thousand to one.
It also assumes you have a resistance, not a complex impedance - you said your load was an impedance. If you ignore the reactive effects of your load, again, you could be off by a ridiculous amount.
Energy = Power x Time. You integrate (or more typically do a Riemann sum approximation) of the power waveform over time. Unless your problem fits that calculator exactly, you will get a much closer number by doing the Riemann sum approximation with pencil and paper by plotting a lousy half-dozen points. Or do it right and use a spreadsheet. First, you need to understand what it is you are doing.
Power isn't simply voltage or current, it isn't simply force or distance. This is a very important concept that over-unity nutters are always getting wrong. Your voltage will have one function into a complex impedance, your current will have another. You need both.