Here is how I did it for last year. 4 [9 [0 {% o& ~: N. x; z ( p& ]/ f7 B6 ` w) b& F: [/ R--Downloaded trading record from my broker. * }: z6 ]. a0 h O. j1 X--Calculated gains(losses) when a position is closed. & \/ H! K0 i; H2 `, v7 g) \--Added them up. + ^: c F$ [' l( Z9 E1 c , Q x- V3 c1 [4 M5 z& v$ gNote: expenses such as commissions are always to be taken out of the gains. Cost of shares need to be adjusted when dividends are reivested or there are multiple trades occourd for the same stock.