lol when my sister needed help on the pc i would tell her to do it herself.
With other family, i do it and they feed me lol.
If its someone else i usually say up front its 10 bucks an hour.
Or, i usually tell them a set price.
Reinstalling Operating systems has to be the most painstaking task,(unless its your own, in which case you should always have a copy of your HDD and then you can format your current one, and copy your backup onto your primary)
reinstall OS: $20
minor bug that takes you a few minutes:$5
setting up a new piece of equipment:$5-10
Virus: $10-$20 depending on how bad
Just say it up front and they will usually like those prices and not be disappointed.
I wouldnt charge close family members, they usually have a way of paying you back in some way.
If its like, your uncles third cousin, treat them like a customer.
Keep in mind, these prices do not include parts cost or travel.