To the best of my knowledge, ELSS investments are taxable on withdrawal to the extent of the principal invested. The capital gain, being long-term in nature, arising on withdrawals are however exempt from tax. For example, if I invest Rs 50,000 in an ELSS fund and redeem the units after three years when the capital appreciates to say Rs 90,000, I will have to pay tax on principal amount, i.e., Rs 50,000 at the time of withdrawal.
The problem arises when I consider investing this Rs 50,000 through an SIP of Rs 5,000 over 10 months. If at the end of three years from the last SIP investment, I redeem only a part of the corpus (not all the units), the withdrawal tax can't be applied to the principal amount directly, since the units were purchased at different NAVs and therefore the corresponding principal amounts will also differ. In such a case, how is the principal arrived at for tax calculations? Is an average of the unit prices taken?
Withdrawals are not taxable in ELSS funds, and that includes capital gains as well as principal. Therefore, if you invest Rs 50,000 in an ELSS, which grows to Rs 90,000 in three years, the entire Rs 90,000 will be tax-free.
What you are talking about is the EET (exempt-exempt-tax) structure of charging tax, which has been talked about in the Budget but not yet implemented. As of now, the principal investment in an ELSS will not be subject to tax upon withdrawal.
Coming to the second part of your question, tax applicability is determined on a first in, first out basis. Therefore, the units purchased first will be deemed for redemption first and tax will be calculated accordingly. Although there is no tax on the principal at the time of withdrawal as of now, but should that be made applicable in future, the principal calculation may be made in the same way by applying the first in, first out criterion.