Text this: A generalized formula of Hardy