The formula for calculating the deduction of 80g includes first figuring out the amount that has been donated to an ngo and then applying the rate allowed which is either 50 or 100 percent. After that, any ceiling applicable based on the adjusted gross total income will be applied.