if total > 5000 then multiply it by .25 if not then multiply it by .5 This

is fine after $5000 but say my very first entry is $6000, i need it to calculate the first $5000 at 50% and the remaining $1000 at 25% and add them together to give me the total, but at the same time once the first $5000 is reached I only want it to calculate everything from then on at 25%. So every sheet from then on gets calculated at 25%. So confusing