The core principle, stated plainly by Arukh HaShulchan (Yoreh De'ah 249:1-7), is that maaser kesafim is calculated only on net profit: all costs of doing business, including travel, food and drink incurred for the business, are deducted first, and only the true residue of profit is tithed — though personal household expenses are not deducted, so one tithes profit even if one's living costs exceed it.
Ahavat Chesed (Part II 18:5-6) likewise directs that one keep a ledger recording profit only after business expenses have been deducted from the venture, reckoning the account every half-year or year and subtracting any losses before tithing the remainder.
Avkat Rokhel (3:2-3) criticizes those who tithe improperly by failing to separate maaser from the principal before profit accrues and by failing to tithe the profit itself, implying that the proper practice is to tithe the net gain rather than gross receipts.
Several Acharonim debate how to treat losses within the netting process: Noda BiYehudah (II, Yoreh Deah 198:3-4) holds that a loss in one line of business does not offset profit in another, so one must tithe the profitable venture's gain in full, while Pitchei Teshuva (Yoreh De'ah 249:1) records the Chavot Yair's and Shaar Efraim's distinction based on whether the accounting was done within the same year, and Havot Yair (224:9) similarly treats business losses and incidental expenses as absorbed into the principal, with only the subsequent increase counted as the profit subject to tithing.
The Shulchan Arukh and Tur frame the broader law of tzedakah giving — a fifth as the ideal measure, a tenth as the median, less than a tenth as stingy, calculated on the first year's principal and thereafter on yearly profit — as in Shulchan Arukh (Yoreh De'ah 249:1), Tur (Yoreh De'ah 249), and Beit Yosef (Yoreh De'ah 249:3), establishing that the base figure for tithing is profit, not gross capital or income.
Among modern poskim, Rav Eliezer Melamed (Peninei Halakhah, Likkutim II 6:10) rules directly on salaried income: maaser is taken from net pay, since that is the money actually received, and from the whole net amount — mortgage and property tax payments are treated as ordinary living expenses and are not deducted, though commuting costs to work may be subtracted since the expense exists only because of the job.
Avnei Yashfeh (1:190) and Avnei Yashfeh (1:191) both raise the practical question of whether necessary food and clothing expenses may be deducted before tithing or whether maaser must be taken from the whole of one's earnings, citing the Knesset HaGedolah on Yoreh De'ah 249 as a basis for the question.
Tzitz Eliezer (20:42) takes up the same question of whether maaser is computed from total earnings or after deducting household expenses, citing a responsum of the Maharam Broida that reaches a ruling on the point, and Tzitz Eliezer (10:6) concludes that one may rely on the view permitting deduction of necessary household expenses before tithing, provided one is not excessively frugal, while noting that departing from an already-established practice may require hatarah.
Rav Gavriel Zinner (Nitei Gavriel, Nisuin vol 2, perek 117) addresses how an established practice of tithing can itself take on the force of a vow requiring hataarah to change, and rules that certain gifts and income-like receipts may be subject to tithing while funds given only for bare subsistence support are not.
Earlier sources on the mitzvah of maaser more broadly, such as Shenei Luchot HaBerit (Torah Shebikhtav, Toldot, Ner Mitzvah:3) tracing the practice to the Avot, Mekhilta DeRabbi Yishmael (Tractate Kaspa 3:27) on tithing produce, and Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim (זכר למחצית השקל 692:8) and Rav Mordechai Eliyahu (Maamar Mordechai Hilchot Shabbat, Chelek 2 28:25) on what maaser funds may be used for, do not bear directly on the gross-versus-net question but round out the surrounding halachic picture of maaser kesafim.