Seems that any machine certified for flight is inherently safe when all its parts are working properly.
Airplanes probably have the advantage in safety though for three reasons.
1. They are more stable, and usually have more automation reducing pilot workload and decreasing the chance of pilot error.
2. They land at the safest places - airports (typically). People don't buy helicopters to land at airports.
3. They spend far more time enroute than a helicopter. Accidents are far more likely to happen on a departure or arrival.
The advantage a helicopter has is that it can land nearly anywhere if there is a problem. For instance, if there were a fire on board I could likely be on the ground in minutes, where as an airplane must find an airport. Many accidents could've been avoided if a safe landing area could be found in time.