How do I write a formula whereas the end result is capped at a certain percentage.

For example:

=d13*(1+b14), the solution to that part of the formula cannot be greater than d4. I am very new at this, I know how to do the math but not create the formula

15000 * 1 plus the percentage = x but cannot be greater than y and if is a negative number cannot be less than 0

Any help would be greatly appreciated