The formula
Energy in kilowatt-hours = power in kilowatts × hours. Cost = energy × your price per kWh. A 120 W average over 4 hours is 0.48 kWh, which at $0.17 per kWh is about $0.08.
Average power is not the printer’s rating
A printer’s maximum power rating is only reached while heating up. Once the bed and hotend are at temperature the heaters cycle on and off, so the average over a whole print is lower. As a rough guide only, many desktop printers average somewhere between about 50 and 200 W, with enclosed machines and hot beds at the high end. A plug-in energy meter gives the real figure for your printer and your material.
Which price per kWh to use
Use the all-in rate on your bill, including delivery charges, not just the energy line. Rates vary a lot by region and sometimes by time of day.