What you have written is correct except for the fact that the flexed budget is not the actual results – it is the budget as rewritten for the actual level of activity (i.e. actual level of sales and of production).
See my lectures working through example 2 of Chapter 11 of our free lecture notes.