Creating custom stats

Hi,
Can someone point me in the direction of documentation or tutorials explaining how to create custom stats? I see people using formulas around here and I'd like to do similar but have no idea where to start. All help warmly appreciated.
Regards,
Dave
Can someone point me in the direction of documentation or tutorials explaining how to create custom stats? I see people using formulas around here and I'd like to do similar but have no idea where to start. All help warmly appreciated.
Regards,
Dave