245/45/18 and 245/40/18 are the same width of tread, but the sidewall is smaller. the second number is an aspect ratio of the first number, so the sidewall height is a percentage of the tread width.

just run with 245/45/18 and be done with it. 235/50/18 isnt the best size.