I seem to recall doing this for someone once...yep, here it is. You better validate the results:if object_id('dbo.PMT') > 0 drop function dbo.PMTgocreate function dbo.PMT(@rate numeric(15,9), @periods smallint, @principal numeric(20,2) )returns numeric (38,9)asbegin declare @pmt numeric (38,9) select @pmt = @principal / (power(1+@rate,@periods)-1) * (@rate*power(1+@rate,@periods)) return @pmtendgoselect dbo.pmt(0.0625/12, 30*12, 100000)select dbo.PMT(0.00374, 24, 10945.60)Be One with the OptimizerTG