in the latest version of org-mode, the table editor has been extended
to have many spreadsheet-like capabilities. It makes use of the Emacs
calc package and allows you to use complex expressions to calculate
fields in a table.
Even if you are not using org-mode, the table editor/spreadsheet can
be embedded into any other major mode through the minor orgtbl-mode.