I think I did this sometime ago but here are my calculations. Correct me if any assumptions/math is wrong. I am not seing the big savings with an electric water heater at oil's current price. Here goes:
Assume 4773 KWH yearly use for hot water as per the DOE spec. At 16.4 cents/kwh, (my rate) that is $782.00/year. For oil, 4773 kwh = 16286153 btu's. Assume #2 oil is 138,500 but/gallon. At 80% efficient (mine is higher), I get 110,800 useable btu's/gallon. 16286153 btu's/110,800 btu's gallon = 146.98 gallons oil/year. At (my rate) $3.64 gallon, that is $535.00/year, $247.00 (68 cents/day) less than electric. To be equal, oil would have to be $5.32/gallon. Another angle would be that if your oil appliance was only 55% efficient, the hot water bills would be the same.
We assumed both heaters have the same standby losses but the boiler has some. I figure a 20 gallon boiler going from 180 deg to 100 deg once a day would lose about 12,480 btu and cost maybe 40 cents/day. Many boilers have burner dampers that close to prevent stack loss as does mine. Incidentily, I have a power venter so no chimney losses. You also have operating cost for an oil boiler which, ironically, electricity is needed. I am not sure what the consumption is but I will look into it. Maintenance/installation cost are a consideration. The only way you can compare is life cycle cost between them.
It would seem at this hot water useage example, it is a wash between the cost of oil or electric in this situation. I do have a 100 tube evac solar array for domestic water so I can't really use a real world example.