My capri stock had 205/50/15 which are roughly 23.07 inches in diameter (15 inch wheel, 4.035 inches of tire above and 4.035 inches of tire below the wheel)
If you went to a 17 you would want to run 195/40/17 which is 23.14 inches in diameter (17 inch wheel, 3.07 inches of tire above and again below)
The overall diameter would be off 7/100 of an inch (which quite frankly is probably less than the difference between a new tire and an old one)
a 205/50/15 mounted on a 15 inch whee should be 23.07 inches tall and 8.07 inches wide
a 195/40/17 mounted on a 17 inch wheel should be 23.14 inches tall and 7.68 inches wide.
to not lose a little width would make the tire taller....
I checked and Michelin makes a 205/40/17 which would then allow you to remain at 8.07 wide but the height would be 23.46 inches
Remember the first number is the width
The second number is a percentage of the first number and represents the distance between the rim and the ground (or the rim and the tread)
so a 205/40 means the sidewall is 40% of the 205 (205 is mm which is roughly 8 inches as noted above)
as long as the diameter is very close the speedometer will be close you just need to remember when you put a different wheel on that the backspacing is critical to avoid having to use spacers which is always a good practice.
For example the old wheels on muscle cars (or most rear wheel drive cars) generally have the part of the wheel that hits the brakes near the center of the wheel while most front wheel drive wheels have the part of the wheel that hits the brakes more toward the outside of the wheel so more of the wheel extends around the brakes and can rub on the inside more.
The tire size being close will help with all geometry but whether or not it rubs is generally the backspacing on the wheel