At what age is it safe to swim alone?

Never. Always swim with a partner or a life guard. This is a standard teaching in every water safety course.
Risk always a factor. Most water safety courses teach that you can never drown proof a person at any age. The venue;lake vs wading pool vs pool all factor in.Level of skill & status of swimmer(rested vs tired) are considered.I am not sure anyone is really safe swimming alone at any age.We have teens & adults drown at the local lake every year even with others around.I encourage a designated observer for all events.