Topic 1 / 3📁 Unit Index
BP101T • Unit 5Topic 1 of 3⏱ 5 Min Read

1. Tablet Weight Variation Testing & IP/USP Compliance Script

💡 Core Concept & Clinical Context:

The Indian Pharmacopoeia (IP) mandates that for solid oral dosage forms (tablets/capsules), 20 individual units must be weighed randomly from a batch. The mean weight is calculated, and individual weights are compared against permissible percentage deviations. To pass the IP test: not more than 2 individual tablets may deviate from the average weight by more than the percentage limit, and no tablet may deviate by more than twice that percentage.

Pharmaceutical Code & Calculation Examples:
1Automated IP Tablet Weight Variation Checker

Evaluating 20 sample Paracetamol 500mg tablets (average weight ~650mg) against IP standards.

example_1.py
import numpy as np

# Sample weights of 20 tablets in milligrams
sample_tablets = np.array([
    648, 652, 645, 655, 649, 651, 650, 647, 658, 642,
    650, 653, 646, 654, 649, 651, 655, 644, 650, 652
], dtype=float)

avg_wt = np.mean(sample_tablets)

# Determine IP percentage tolerance limit based on average weight
if avg_wt <= 80.0:
    limit_pct = 10.0
elif avg_wt < 250.0:
    limit_pct = 7.5
else:
    limit_pct = 5.0  # For tablets >= 250 mg

dev_1x = avg_wt * (limit_pct / 100.0)
dev_2x = avg_wt * ((limit_pct * 2.0) / 100.0)

deviations = np.abs(sample_tablets - avg_wt)
count_out_1x = np.sum(deviations > dev_1x)
count_out_2x = np.sum(deviations > dev_2x)

passes_ip = (count_out_1x <= 2) and (count_out_2x == 0)

print(f"Average Tablet Weight: {avg_wt:.2f} mg")
print(f"IP Tolerance (±{limit_pct}%): ±{dev_1x:.2f} mg | Double Limit: ±{dev_2x:.2f} mg")
print(f"Tablets outside ±{limit_pct}%: {count_out_1x} (Max allowed: 2)")
print(f"Tablets outside ±{limit_pct*2}%: {count_out_2x} (Max allowed: 0)")
print(f"IP WEIGHT VARIATION RESULT: {'PASSED' if passes_ip else 'FAILED'}")
Comparison & Reference Table:
IP Average Tablet WeightPermissible Deviation (%)Max Allowed Outside Limit (out of 20)Max Allowed Outside Double Limit
80 mg or less± 10.0%2 tablets0 tablets
More than 80 mg and less than 250 mg± 7.5%2 tablets0 tablets
250 mg or more± 5.0%2 tablets0 tablets
📋Key Takeaways & Exam Highlights
  • IP Weight Limits: $\le 80\text{ mg} \rightarrow \pm 10\%$; $80\text{ mg to } 250\text{ mg} \rightarrow \pm 7.5\%$; $\ge 250\text{ mg} \rightarrow \pm 5.0\%$.
  • USP Limits follow identical three-tier weight thresholds.
  • Relative Standard Deviation (%RSD): $\%RSD = \frac{\text{Standard Deviation}}{\text{Mean}} \times 100$ (Must generally be $< 2.0\%$ for tablet weight uniformity).
🇮🇳 हिन्दी व्याख्या (1. Tablet Weight Variation Testing & IP/USP Compliance Script)

आईपी के नियमानुसार 20 गोलियों का औसत वजन निकालकर देखा जाता है कि 2 से अधिक गोलियां तय प्रतिशत सीमा से बाहर न हों और कोई भी गोली दोगुनी सीमा से बाहर न हो।

Need to see the complete unit overview, solved numericals, or exam checklist?Open Unit 5 Overview Hub →