Is there a difference?
To understand when we use less than and when we use fewer than we need to take a step back and think about countable and uncountable nouns.
The clue is in the name...
A countable noun is something that can be counted, for example cups of coffee, bags of sugar, vases of flowers.
An uncountable noun is something which cannot easily be counted, for example coffee (you cannot easily count the number of beans in a bag), sugar (you cannot easily count the number of granules), flowers in a field (you cannot easily count the number of sunflowers in a field).
Now let's apply this to less than and fewer than.
Less than for when we cannot count the items - uncountable nouns.
Fewer than for when we can count the items - countable nouns.
Less than - uncountable.
There is less than half a packet of coffee left in the cupboard. Not fewer than half a bag.
There is less than half the amount of sugar in this cake than the one I made yesterday. Not fewer than the amount of sugar in this cake.
There are less than a quarter of the amount of flowers in this field than the one next to my house. Not fewer than a quarter of the mount of flowers.
Fewer than - countable
I had to make fewer than 5 cups of coffee for the meeting today. Not less than 5.
There were fewer than 10 bags of sugar on the supermarket shelf. Not less than 10.
There were fewer than 4 vases of flowers in the hotel lobby. Not less than 4.
However, in current language usage, you will hear people use "less than" rather than using "fewer than". For example, it wouldn't be unusual to hear "there were less than 10 bags of sugar on the shelf".
If you do find yourself confused as to whether you should be using "less than" or "fewer than"...use less than.