just subtract the numbers since the rims are the same width. the 15 rim will sit 25mm more further out than the 40 but that means it will also give you 25mm more inner clearance than the 40
www.1010tires.com
click on wheel offset calculator under the "tech section"