With JavaScript. In the attachment you'll find a simple example. Basically,
1. use PDF text boxes for entries containing numbers which will be calculated,
2. give every box unique name (double click to open "Field Properties" dialog),
3. define type of field (number, percentage etc.) in "Format" tab of "Field Properties" window,
4. in "Calculate" tab define what operation should be done (I used "Custom calculation script" in the example).
Note 1: You'll need a PDF viewer which supports JavaScript.
Note 2: If you're using Adobe Reader, you won't be able to save values entered in PDF (only Adobe Acrobat can do that). However, you can use, e.g.,
PDF-XChange Viewer instead.