Every agreement, by which any one is restrained from exercising a lawful profession, trade or business of any kind, is to that extent is void. (Section 27).

Exception-
One who sells goodwill of business may agree with the buyer to refrain from carrying on a small business, within specific local limits, so long as the buyer, or any person deriving title to the goodwill from him, carries on a like business therein; Provided that such limit appear to the Court reasonable, regard being had to the nature of the business. (Section 27).
The words ‘restraint from exercising a lawful profession, trade or business’ do not mean an absolute restriction, and intended to apply to a partial restriction. Madhub Chunder v. Rajcoomer Dass, (1874) 14 B.L.R. 76.  

Exception of the rule –

1.    A seller in business and its goodwill may be restrained reasonably from carrying on any business that similar to the one sold (Section 27).

2.    A partner may be restrained by the others from carrying any business similar to that of the firm [Section 11(2) of the Partnership Act, 1932]. 

3.    An outgoing partner may be reasonably restrained by the remaining partners from carrying any business similar to that of the firm[Section 36(2) of Partnership Act, 1932] 

4.    On the dissolution of the firm, the partners may reasonably restrain each other from carrying any business similar to that of the dissolved firm (Section 54 of the Partnership Act, 1932).

In all these cases, the restraint must be reasonable. Other exceptions from Sri Gopal Paper Mills v. S. Malhotra are discussed below.  

Other exception- 

Trade combination: In spite of section 27 in spite of any restraint that might be imposed upon a party to an agreement seeking to establish an economic combination, such combinations will be valid if  (a) they are not against the interests of any of the contracting parties, and (b) they are not against public interest.

Fraser & Co. V. Bombay Ice manufacturing Co. (1904): An agreement between different ice manufacturing companies not to sell at a price below the agreed one and to share profits in a certain proportion is a valid one.

Nordenfelt  v. Maxim Nordentfelt Co.(1894): A negative restraint in a service contract is valid if it is reasonable in point of period of time and area of operation, and void if unreasonable.

Oakes & Co. V. Jackson (1876): The plaintiff agreed with the defendant that that after termination of services, the defendant would not take up similar employment within 800 miles of Madras. Held restraint was void.