Re-Write Query For Speed
Even when creating a table via SELECT ... INTO, you can include empty columns to be populated later. This avoids the need to ALTER the table even once:

Select * FROM MasterData
SELECT [Store]
    ,[SaleID]
    ,TPC = SUM(COALESCE([TotalCost],0))
    ,timesbilled = CAST(NULL as int)
    ,TC1 = SUM(COALESCE([TotalCost],0))
INTO HelperTable
FROM Costing
GROUP BY Store, SaleID

UPDATE t
SET t.TimesBilled = h.TimesBilled
   ,t.TC1 = CASE WHEN h.TimesBilled &gt; 1
              THEN t.TC1/h.TimesBilled
              ELSE t.TC1
            END
FROM HelperTable t
INNER JOIN [Hold1] h
ON t.SaleID = h.SaleID

UPDATE x
SET TC1 = y.TPC
,TC2 = y.TC1
FROM MasterData x
INNER JOIN HelperTable y
ON x.Store = y.Store


If HOLD1 is guaranteed to have 0 or 1 records for each SaleID, you can compress this even further, avoiding the need for the UPDATE - at which point, you can actually skip HelperTable, and put a subquery directly into the MasterDate UPDATE statement:

UPDATE x
SET TC1 = y.TPC
,TC2 = y.TC1
FROM MasterData x
INNER JOIN (SELECT c.[Store]
                  ,c.[SaleID]
                  ,TPC = SUM(COALESCE(c.[TotalCost],0))
                  ,TimesBilled = h.TimesBilled
                  ,TC1 = CASE WHEN h.TimesBilled &gt; 1
                           THEN SUM(COALESCE(c.[TotalCost],0))/h.TimesBilled
                           ELSE SUM(COALESCE(c.[TotalCost],0))
                         END
              FROM Costing c
                     LEFT  JOIN [Hold1] h ON (c.SaleID = h.SaleID)
             GROUP BY c.Store, c.SaleID, h.TimesBilled
           ) y ON x.Store = y.Store


On my system, the original query took 13 ms to execute (I ran it twice, same both times); My version with HelperTable took 10 ms the first time I ran it, and 6 the second; and the version without HelperTable took 3 ms the first time, and 0 ms the second. (Noting first and second runs as the second run may be able to use a cached plan).