I'm looking for some help as I'm not really sure of the correct terms to use on my query below, so whilst normally I would google this, I'm not really sure what to search for. 

I need to work out the total cost for something, where you have a flat rate, and then an additional cost that changes depending on how much of something you have.

So an example, you get expenses paid for millage. If you drive 0-20 miles, you'll get £10. Between 30-50 miles you get 50p per mile. Between 51-100 miles you get £1 per mile and so on, added onto the base rate of the initial £10 you'd get paid as standard.

It's not the best example, but hoping it gives an idea of what I'm after. 

If I was doing this by hand I'd know how to work it out, but I'm not to sure what kind of formula I need to be using - I've never had to work with complex formulas past "=sum" until now.

If anyone has any examples they can share or can point me in the right direction of what kind of things to google I'd be most grateful !

Thanks