I'm an IT Director for a medium-sized city in South Louisiana, but programming has always been a hobby of mine.
As for the formulas:
I have an array that has the percentages for the weight each # of reps would be. For instance, 1RM = 100%, 5RM = 86%, 8RM = 78%.
Once you put in the weight you lifted and the number of reps, I grab the percentage that is at the index in the array that matches the number of reps. Then it divides the weight you lifted by that percentage to get the estimated 1RM.
So if you put in that you lifted 80 for 5 reps. It divides 80 by .86 to give you an estimated 1RM of 93.
After that it cycles through the array and multiplies the 1RM weight by the percentages at each index.
For increasing weight with each workout, I went with 1.25% - 2.5% since I've seen CW recommend those percentages. After it calculates what you should lift in your next workout based on which weight increase percentage you selected.
Like I said, it's not perfect. For instance, earlier today I read where CW estimated that your 18RM would be about 60% of your 1RM, but I have it at 56%. But it works for me and I don't think it'll make a huge deal.