I have the following data:

40% debt, 10% preferred, and 50% common equity. After-tax cost of debt 4.00%, cost of preferred 7.50% and cost of retained earnings is 11.50%

in using this formula:
WACC = wdrd(1-T) + wprp + wcrs
r=(40%)(4.00%)+(10%)(7.50%)+(50%)(11.50%)=8%

Is this right

Yes, your calculation is correct. You have correctly applied the weighted average cost of capital (WACC) formula to calculate the expected return.

The formula you used, WACC = wdrd(1-T) + wprp + wcrs, represents the weighted average of the different sources of financing (debt, preferred equity, and common equity). Here's how you calculated it:

WACC = (40%)(4.00%) + (10%)(7.50%) + (50%)(11.50%)
= 1.60% + 0.75% + 5.75%
= 8%

Your result of 8% represents the expected return on the total capital structure based on the given weights and costs of debt, preferred equity, and retained earnings.