DIY Invest Help is built to assist new or experienced DIY investors in managing their portfolios. The calculator determines how many shares of each security you should buy to maintain your portfolio's desired allocation. Alternatively, you may also determine the number of shares to buy and sell to rebalance your portfolio, without adding new funds.