After 2 years, $40,000 deposited in a savings account with simple interest had earned $12,000 in interest. What was the interest rate?