Spreadsheet: 737842d1624624823-need-a-single-formulas-to-calculate-net-worth-overall-gain-and-couple-of-more-parameters-money
Sheet: Portfolio

 | This is how I made my transactions |  |  |  | Last trading price on 24 Jun | 119.7
 | Date | Price | Side | ShareQty
 | 2021-05-25 00:00:00 | 100.4 | BUY | 250 | My Networth (Latest Value) | 43331
 | 2021-05-31 00:00:00 | 92.5 | BUY | 54 | Quantity | 362.2
 | 2021-06-03 00:00:00 | 100.75 | SELL | -14 | Investments | 39868
 | 2021-06-07 00:00:00 | 126.9 | SELL | -38 | Today's Gain | -2263 | -0.0496
 | 2021-06-10 00:00:00 | 154.1 | SELL | -27 | Overall Gain | 3463 | 0.0869
 | 2021-06-14 00:00:00 | 140.9 | BUY | 40
 | 2021-06-16 00:00:00 | 127.25 | BUY | 40
 | 2021-06-18 00:00:00 | 114.9 | BUY | 40
 | 2021-06-22 00:00:00 | 126.6 | SELL | -18 |  |  |  |  | The report below is downloaded from the website
 | 2021-06-24 00:00:00 | 119.7 | BUY | 35
 |  |  |  |  |  |  |  |  | Stocks Bought
 |  |  |  |  |  |  |  |  | PURCHASE |  |  |  | LATEST |  |  | Live Price | Change | Quantity | Latest Value | Inv. Price | Day's Gain | Overall Gain
 |  |  | My Networth (Latest Value) |  |  |  |  |  | Qty | Date | Price | Amount | Price | Value |  |  |  |  |  |  | % Change | % Change
 |  |  | Quantity |  |  |  |  |  | 153 | 25-05-2021 | 100.4 | 15361.2 | 119.7 | 18314 |  | 119.7 | -6.25 | 362 | 43331 | 110.13 | -2263 | 3464
 |  |  | Investments |  |  |  |  |  | 54 | 31-05-2021 | 92.5 | 4995 | 119.7 | 6464 |  |  |  |  |  |  | -0.0496 | 0.0869
 |  |  | Today's Gain |  |  |  |  |  | 40 | 14-06-2021 | 140.9 | 5636 | 119.7 | 4788 |  | Quantity | Inv. Price | Inv. Date | Inv. Amount | Day's Gain% | Overall Gain | Latest Value
 |  |  | Overall Gain |  |  |  |  |  | 40 | 16-06-2021 | 127.25 | 5090 | 119.7 | 4788 |  | 35 | 119.7 | 24/06/2021 | 4190 | 219 (-4.96%) | 0 (0.00%) | 4190
 |  |  | Inv. Price |  | 110.13 |  |  |  | 40 | 18-06-2021 | 114.9 | 4596 | 119.7 | 4788 |  | 40 | 114.9 | 18/06/2021 | 4596 | 250 (-4.96%) | 192 (4.18%) | 4788
 |  |  |  |  |  |  |  |  | 35 | 24-06-2021 | 119.7 | 4189.5 | 119.7 | 4190 |  | 40 | 127.25 | 16/06/2021 | 5090 | 250 (-4.96%) | -302 (-5.93%) | 4788
 |  | Price | Side | ShareQty |  |  |  |  | Stocks Sold |  |  |  |  |  |  | 40 | 140.9 | 14/06/2021 | 5636 | 250 (-4.96%) | -848 (-15.05%) | 4788
 |  | 100.4 | BUY | 250 |  |  |  |  | PURCHASE |  |  | SELL |  | PROFIT |  | 54 | 92.5 | 31/05/2021 | 4995 | 338 (-4.96%) | 1,469 (29.41%) | 6464
 |  | 92.5 | BUY | 54 |  |  |  |  | Date | Price | Qty | Date | Price |  |  | 153 | 100.4 | 25/05/2021 | 15361 | 956 (-4.96%) | 2,953 (19.22%) | 18314
 |  | 100.75 | SELL | -14 |  |  |  |  | 25-05-2021 | 100.4 | 14 | 2021-03-06 00:00:00 | 100.75 | 5
 |  | 126.9 | SELL | -38 |  |  |  |  | 25-05-2021 | 100.4 | 38 | 2021-07-06 00:00:00 | 126.9 | 1007
 |  | 154.1 | SELL | -27 |  |  |  |  | 25-05-2021 | 100.4 | 27 | 2021-10-06 00:00:00 | 154.1 | 1450
 |  | 140.9 | BUY | 40 |  |  |  |  | 25-05-2021 | 100.4 | 18 | 22/6/2021 | 126.6 | 472
 |  | 127.25 | BUY | 40 |  |  |  |  | Profit / Loss |  |  |  |  | 2933
 |  | 114.9 | BUY | 40
 |  | 126.6 | SELL | -18
 |  | 119.7 | BUY | 35
 |  | Average Inv. Price is |  |  | <= this is incorrect
 |  | Below I deducted sum of sold quantities (97) from original quantity 250 as per FIFO first in first out method
 |  | Price | Side | ShareQty
 |  | 100.4 | BUY
 |  | 92.5 | BUY | 54
 |  | 140.9 | BUY | 40
 |  | 127.25 | BUY | 40
 |  | 114.9 | BUY | 40
 |  | 119.7 | BUY | 35
 |  | Average Inv. Price is |  |  | <= this is CORRECT