The formula used to calculate megawatt-hours is Megawatt hours (MWh) = Megawatts (MW) x Hours (h). To convert megawatt hours to megawatts, you are going to need to divide the number of megawatt hours by the number of hours. In other words: Megawatts (MW) = Megawatt hours (MWh) / Hours (h).