So if I power the op-amp with 5V at the positive supply I`ll get ( 5V - 1,5V = 3,5V ) at the output ?
And If I choose an op amp in the future I should look for the Voltage Range parameter?
Yes I understand that rail to rail will give 2.99999 V at the output in my example with 3V supply.
Two parameters are important for your application:
Common mode or input voltage range. This is the range of voltages the op-amp's inputs will work between. The LM358 and LM324 have an input voltage range between the op-amp's negative rail and 1.5V les than the positive rail. If one or both of the inputs are taken outside this range, the op-amp's output becomes undetermined. In some cases, phase reversal occurs, which means the inputs exchange functions: the inverting input becomes the non-inverting input and vice versa. Some op-amps have a common more range which exceeds one of the supply rails, although it's not documented, the LM358 and LM324 will work with their inputs down to 0.3V below the negative rail, but it's not guaranteed. An op-amp with a rail-to-rail input, means the input voltage range covers the entire supply voltage range.
Output voltage swing. This is the range of output voltages the op-amp's output can obtain. If it's exceed, the output will just saturate at the highest or lowest voltage it can. This is always within the supply rails, unless the op-amp has a built-in charge pump, to boost the supply voltage. It's heavily dependant on the load current and often the supply voltage. A rail-to-rail output means the output will work over the full supply voltage range, although it can't quite reach each supply rail because it will have some resistance, but it's normally quite low, compared to what one would typically load an op-amp with.