The TI is calculated using the formula: TI = TD50 / ED50 Where TD50 is the dose that causes toxicity in 50% of the population, and ED50 is the dose that is therapeutically effective in 50% of the population. This formula provides a quantitative measure that helps in determining the safety margin of a drug.