# # Calculating Nice Numbers

One of the biggest issues you will run into balancing your systems, especially if you use automated and excel driven calculations, is that the numbers can be quite ugly. Would you rather your players buying something for $63,829.29, or would you rather them buying something for $65,000.

If you like to see a real world example of this problem, check out the article on Value of Items. Or, for a more in depth look, try playing around with different Growth Rates yourself.

To combat this I use a very simple two-factor method of rounding the final results.

- The log10 factor, aka Significance
- The non-zero factor, aka RoundTo

## # Significance

One of the issues, at least that I have found, is that the bigger the numbers get, the less precision you really need in the final result, at least from a player's perspective. People have a really hard time judging the difference between numbers with 4, 5, or even 6 digits.

Which would you rather compare at a glance?

```
634,223
624,423
611,993
```

Or would you rather compare

```
650,000
625,000
600,000
```

And for most games.... there isn't a meaningful, mechanical difference between the two, but there is absolutely a difference in feeling.

So once of the things that I decide is the amount of precision that is really required from a meaningful, mechanical perspective, and everything else gets tossed away. To do this I use the log10 of the generated number.

## # RoundTo

This is the easier, more familiar of the two. This controls how I want the non-zero number number to be round. Sometimes I don't want it rounded, and other times want it rounded to the nearest power of 2; but most often it's to the nearest power of 5.

## # Try It Yourself

With both of these combined, you can get very pleasing results for almost any automatically generated number in your system.

Here is a little toy that you can play with to see the results.

Starting Values | Rounded Values |
---|---|

20 | 20 |

114 | 115 |

352 | 350 |

553 | 555 |

798 | 800 |

1067 | 1050 |

1212 | 1200 |

1525 | 1550 |

1861 | 1850 |

2415 | 2400 |

4375 | 4400 |

54078 | 54000 |

63242 | 63000 |

83144 | 83000 |

104769 | 105000 |

128003 | 130000 |

152732 | 155000 |

178888 | 180000 |

250009 | 250000 |

328636 | 330000 |

414124 | 415000 |

707102 | 705000 |

1048091 | 1050000 |