Indicating the total quantity, the adverb yígòng 一共 ‘altogether, in total’ is generally used before numeral phrases or before verbs that are followed by numeral phrases. Yígòng 一共 is used to state a definite, summed total. It is not used for approximations.

Structure
Yígòng 一共 is usually placed directly before numeral phrases or before verbs that are followed by numeral phrases.
subject
这些衣服
這些衣服
一共
一共
一共
numeral phrase
一百块。
一百塊。
These clothes cost ¥100 in total.
subject
学中文的学生
學中文的學生
一共
一共
一共
numeral phrase
五十个。
五十個。
There are a total of fifty students learning Chinese.
subject
我们
我們
一共
一共
一共
verb
有
有
(了)
numeral phrase
八个人。
八個人。
There are eight of us in total.
subject
他
他
一共
一共
一共
verb
喝
喝
(了)
了
了
numeral phrase
两杯茶。
兩杯茶。
He drank two cups of tea in total.
subject
我姐姐
我姐姐
一共
一共
一共
verb
写
寫
(了)
了
了
numeral phrase
二十个汉字。
二十個漢字。
My older sister wrote twenty Chinese characters in total.
Questions
Yígòng 一共 can be used in interrogative sentences relating to a total quantity.
subject
我们
我們
一共
一共
一共
verb
有
有
numeral phrase
几个人?
幾個人?
How many people are we in total?
subject
这些衣服
這些衣服
一共
一共
一共
numeral phrase
多少钱?
多少錢?
How much do these clothes cost altogether?
subject
他
他
一共
一共
一共
verb
喝
喝
(了)
了
了
numeral phrase
两杯茶
兩杯茶
吗
吗?
嗎?
Did he drink two cups of tea in total?
subject
学中文的学生
學中文的學生
一共
一共
一共
numeral phrase
五十个
五十個
吗
吗?
嗎?
Are there fifty students learning Chinese in total?
With modal verbs and other adverbs
When a sentence contains a modal verb, yígòng 一共 is usually placed before the modal verb.
subject
我
我
一共
一共
一共
modal verb
想
想
verb
买
買
numeral phrase
三件衣服。
三件衣服。
I want to buy three items of clothing in total.
subject
他
他
一共
一共
一共
modal verb
会
會
verb
去
去
numeral phrase
十个国家。
十個國家。
He will go to ten countries in total.
When used together with the adverb zhǐ 只 ‘only, just’, yígòng 一共 typically appears before zhǐ 只.
subject
我
我
一共
一共
一共
只
只
只
modal verb
想
想
verb
买
買
numeral phrase
三件衣服。
三件衣服。
I only want to buy three items of clothing in total.
subject
他
他
一共
一共
一共
只
只
只
verb
去
去
numeral phrase
十个国家。
十個國家。
He is only going to ten countries in total.
Functions
Indicating total quantity
Yígòng 一共 can be used to indicate the total quantity.
A:请问,这些水果一共多少钱?
A:請問,這些水果一共多少錢?
Excuse me, how much do these fruits cost altogether?
B:一共一百一十五块。
B:一共一百一十五塊。
¥115 altogether.
一个星期一共有七天。
一個星期一共有七天。
A week has seven days in total.
爸爸这次出国,一共要去几天?
爸爸這次出國,一共要去幾天?
How many days altogether will Dad be abroad on this trip?
哥哥在这家超市一共工作了两个月。
哥哥在這家超市一共工作了兩個月。
My older brother worked at this supermarket for a total of two months.
我的同学一共学了半年的中文。
我的同學一共學了半年的中文。
My classmate studied Chinese for half a year in total.
妈妈一共给我买了两件大衣。
媽媽一共給我買了兩件大衣。
Mum bought me two coats in total.