Tire size??

Hey guys, ive been doin some searching and i wanted to know what the largest width of tire you can put on a 17x7 rim?? I have 215/40 right now and i want to leave that in the front but change to a 225/45 in the back if not bigger? but i dont want to have to much bend in the side wall. what do you guys think. its a +40 offset

Nick