The threeway analysis shows the difference between the total actual factory overhead and total standard factory overhead costs split into three components: spending variance, efficiency variance, and volume variance.
Components of the ThreeWay Analysis
The threeway analysis consists of: 1.) spending variance, 2.) efficiency variance, and 3.) volume variance. The spending variance consists of the variable spending variance and fixed spending variance (a.k.a. fixed budget variance).
Spending variance  =  Variable spending variance + Fixed budget variance 
Efficiency variance  =  Variable efficiency variance 
Volume variance  =  Fixed volume variance 
Alternatively, the spending variance may be computed as the difference between actual factory overhead and budget allowed based on actual hours (BAAH). If the actual FOH is greater than the BAAH, the variance is unfavorable; otherwise, favorable.
The efficiency variance is the difference between the BAAH and the budget allowed based on standard hours (BASH). If the BAAH is greater than the BASH, the variance is unfavorable.
And finally, the volume variance is the difference between the BASH and the standard factory overhead. Also, if the BAAH is greater than the standard FOH, the variance is unfavorable.
Example
Company XYZ produces a product that has the following factory overhead standard costs per unit. The budgeted production is at the normal capacity of 1,000 units, requiring a budgeted time of 3,000 hours. The total fixed factory overhead at this capacity is $30,000.
Variable FOH  3 hours at $30 per hour 
Fixed FOH  3 hours at $10 per hour 
During the month, the company produced 1,100 units and incurred the following actual factory overhead costs:
Variable FOH  3,250 hours at $29 per hour  $ 94,250 
Fixed FOH  $ 36,500  
Total  $130,750 
The threeway analysis variances can be computed as follows:
SPENDING VARIANCE  
Actual FOH (variable + fixed)  $130,750 

Budget allowed on actual hours (BAAH)  127,500 

*for variable (3,250 hours x $30)  
*for fixed ($30,000 as budgeted)  
Budget variance  $ 3,250 
UF 

EFFICIENCY VARIANCE  
Budget allowed on actual hours (BAAH)  $127,500 

Budget allowed on standard hours (BASH)  129,000 

*for variable (1,100 x 3hours x $30)  
*for fixed ($30,000 as budgeted)  
Efficiency variance  $ 1,500 
F 

VOLUME VARIANCE  
Budget allowed on standard hours (BASH)  $129,000 

Standard FOH (1,100 x 3 hours x $40)  132,000 

Volume variance  $ 3,000 
F 

TOTAL FACTORY OVERHEAD VARIANCE  $ 1,250 
F 
FourWay Analysis
A more expanded breakdown known as "fourway analysis" simply separates the spending variance into the variable and fixed components. The fourway analysis consists of: 1.) variable spending variance, 2.) fixed spending variance, 3.) efficiency variance, and 4.) volume variance.