If you've already got the subtotal rows in your table as in your screenshot, then a simple approach would be to hold down the <command> key and select the subtotal cells like this:
Then simply drag the SUM token that appears into the cell where you want the total. This will automatically insert a formula.
If you haven't yet inserted subtotals and your table still looks something like this...
.... then Smart Categories are an efficient tool for the job. Simply choose Add Category for ... in the dropdown by the column letter of the column that contains the categories:
The result will be something like this:
Then click the 'gear' icon that appears next to a category heading cell in the Amount column and choose Subtotal.
The result will look something like this:
Now to get the grand total click the row number in the last row of the table and choose:
In the cell where you want the cell, enter =SUM(B) and you will get something like this:
Numbers automatically adds the (Body) in the formula, denoting that it doesn't include the subtotals themselves in the sum.
This description makes this seem to be a longer and more complicated process than it really is. It literally takes only about a minute to subtotal by category and derive a grand total.
SG