one important note if you are calculating the size of functions: since IDA now recognizes separated "function chunks" (when a part of the function is located outside the function body (done by some compilers for the sake of cache optimization and multiple function similarities), there might be more bytes in a function then the simple FuncEndEA - FuncStartEA... for the same reason you can't just iterate instructions in a function, and its not wise to check if you reached above the function's end EA...
just keep that in mind
Note: Registration is required to post to the forums.