To calculate the electricity used by the toaster, you can use the formula:
Electricity Used (in kilowatt-hours) = (Power of the device in watts * Time in hours) / 1000
Given that the toaster uses 500 watts and is plugged in for 30 minutes (0.5 hours):
Electricity Used (in kilowatt-hours) = (500 watts * 0.5 hours) / 1000 = 0.25 kilowatt-hours
So, the toaster uses 0.25 kilowatt-hours of electricity when plugged in for 30 minutes.