Here is the formula to calculate the cost of not taking the discount:
Discount Percentage รท (1-Discount %) x [360/(Full allowed payment days - Discount days)]
Divide the discount percentage, 3%, by (100% - 3%), the difference of 100% minus the 3% discount percentage. This equals 3.09%.
Divide 360 -- nominal days in a year -- by the sum of full allowed payment days (25 days) minus allowed discount days (5 days). This equals 18
Multiply the result of 3.09% by 18. This equals 55.62%, the real annual interest rate charged.