First, each tech area has a cost specified in techarea.txt for the first level. Let's call that cost C. The cost for levels beyond the first depends on the tech cost setting in game setup as follows (L = tech level):
Low: cost = C * L
Medium: cost = C * L * L / 2
High: cost = C * L * L
Also, note that the cost to research level 1 of any tech area is always the cost listed in techarea.txt (C). Level one techs are not half as expensive as they would be otherwise in a medium tech cost game.