I am reading Part Two, Chapter 4.3 of javascript.info tutorial. It has an exercise to write a js deposit calculator. I often use a spreadsheet file to calculate road segment crash rate. The equations are not difficult, but it is easy to make mistakes.
The equation below is from this FHWA link.
Here is a js version I wrote. The code is similar to the deposit calculator.
Road Segment Crash Rate Calculator