You could probably do this with a UDF that is called from the DEFAULT constraint. Just watch your concurrency. You'll have to implement some kind of gate to prevent the function from returning the same value when two connection try to insert a row at the same time (or close to the same time).
My recommendation to you is to do the insert within a stored procedure and have the stored procedure retrieve/calculate the necessary values. You'll have much better control over the locking that must occur.
-Mike