I am not exactly sure of the nature of your problem ... I assume that you have a number of people rating something on your site, right? Like a news article or something? I'll use an article as an example.
First, provide a way for them to rate the article, then store that value in your database in one field. You do not need four different fields. You simply need a "ratings" table, with the following fields: id (auto-increment), articleID, rating.
When displaying the article, do a search by articleID for all ratings of that article, and add all of the rating values up. For example, with a rating scale of 1 - 4, 9 people have rated the article so far. Here are the ratings:
1: 4
2: 2
3: 3
4: 2
5: 2
6: 1
7: 4
8: 3
9: 3
The total for the ratings is 4+2+3+2+2+1+4+3+3 = 24 total points. Divide 24 by 9 to get 2.67. That is your "average reader reviews."
Now, you have a choice. If you want to round to the nearest whole star, then simply use round($average). In our example, you end up with 3 stars (round(2.67) = 3).
If you want to use half stars (which I recommend), Then you have to do a little extra. Multiply the average by 2, round it, then divide by two again:
$numstars = round($average * 2) / 2;
In our example, you would end up with 2.5 stars.
I also recommend that you put the actual numerical rating next to the stars, so users can see exactly how well the article did. Star ratings are not exact:
***** SIZE=1[/SIZE]
Hope that helps, and is what you are looking for. I love doing math, so if I can help any further, let me know.
As for my comment on your "pulling your hair..." I was kidding, of course, but in all seriousness you should try to be more descriptive in your subject if you want help with something. Something like "Help with math functions" would have been a little more descriptive, and will entice more experts to read your thread.