I've a little trouble finding out how to linearly interpolate between two numbers with a defined number of intermediate steps.

Let's say I want to interpolate between 4 and 22 with 8 intermediate steps like so : [Example](https://i.stack.imgur.com/nUOJz.png)

It's easy to figure out that it's x+2 here. But what if the starting value was 5 and the final value 532 with 12 intermediate steps? (In my special case I would need starting and ending value with 16 steps in between)