You are right to want to use inline (pure) T-SQL functions. There's two kinds of T-sql functions in SQL Server: Inline Table Valued functions and Wrong. Unfortunately, you can't use Inline Table Valued functions for computed columns and, if performance is remotely important, you DO NOT want to use a T-SQL scalar UDF for a computed column.
The good news is, you don't need to. You have a couple options. First, you don't need a calendar table to calculate working days, you could use this logic for your computed column:
CASE WHEN SIGN(DATEDIFF(dd, @startDate, @endDate)) > -1 THEN
(DATEDIFF(dd, @startDate, @endDate) + 1) --total days including weekends
-(DATEDIFF(wk, @startDate, @endDate) * 2) --Subtact 2 days for each full weekend
-- Subtract 1 when startDate is Sunday and Substract 1 when endDate is Sunday:
-(CASE WHEN DATENAME(dw, @startDate) = 'Sunday' THEN 1 ELSE 0 END)
-(CASE WHEN DATENAME(dw, @endDate) = 'Saturday' THEN 1 ELSE 0 END)
You could also use this logic to create an indexed view which is more flexible and could be a better option.
Here's a couple good links about why you NEVER use T-SQL scalar UDFs as computed columns, or constraints:
A Computed Column with a (scalar udf) might Impact Query Performance –Kun Cheng (SQLCAT)
Another Hidden Parallelism Killer: Scalar UDFs In Check Constraints – Erik Darling (this article applies to computed columns too)
Another reason why scalar functions in computed columns is a bad idea – Erik Darling
Be careful with constraints calling UDFs – Tibor Karaszi
Beware-row-row-operations-udf-clothing – Brian Moran
Why does the Execution Plan include a scalar udf call for a persisted computed column? – Stack Overflow