Calculate hourly cost of electricity used

I would like to calculate hourly cost of electricity used charging my car. Spot price used so price of electricity varies by each hour and is available from Nordpool integration.

My EV charger (Go-e Gemini) provides Wh’s charged to HA so it should be doable to calculate the hourly cost of charging. My idea is then to put this hourly cost to Influxdb and use Grafana to visualize the cost.

The problem is that I have not found a way to calculate this. What would be the easiest way to achieve this?