How to calculate the 60% of the median income in Calc?

I have 40 countries and their Gross National Income. I would like to calculate what is the 60% of their median income (poverty line) using LibreOffice Calc.

Thank you in advance.

You need distributions to calculate medians. The Calc function MEDIAN works on a sample which must be representative if you want reliable results.

As an aside, is it even possible to calculate median income, which refers to income of the citizens, from the Gross National Income which by definition includes many “incomes” which are never seen by the citizens? I doubt that dividing the GNI by the population of each country, for example, will produce a valid “income” for the population. As indicated by @Lupp, you need figures for the distribution of incomes across the population of each country in order to calculate the median of the distribution for each country.

I have the income for a given year for each region (NUTS II) of a specific country. If I got it right, I need to create a frequency distribution of the income? If so, that means that I have to categorize the income into, lets say, 5 categories (0-2000, 2001-4000,… etc). Did I understand it correctly?

To get a useful median you surely should have smaller steps / much more classes.
In addition I would like to know how exactly the frequencies are counted.
May there be cases where people having an income at all are responsible for a group (family) of n (n unknown) persons of which (n-1) persons have 0 income, but are not counted for a respective class?
Sorry. I don’t know much about the topic. (Never trusted in related statistics.)
My knowledge about statistical measures is “abstract”.

By the way: Additional information or consecutive questions should be appended to the original question by editing it. The “Answer” feature should only be used for answers.

Unfortunately I do not know how many members are in a family of every region, I just know the pop of every region [I have 74 regions(cities lets say)].
About the frequencies now, I am searching how to construct them.

Just to exemplify my comments I attach this roughly sketched example.

===EDit1 2018-12-31 18:25===
Only attaching the reworked example as annonced in my comment below.
Please note: Nobody can calculate a real distribution from total values. It must be “measured”.
Well, there are cases in science where the type of the distribution is knows as a “law”, and where then the complete distribution can be generated from a few parameters. That should not be expected in cases as discussed here.

Thank you for your help. But I have some questions about your table. The Column B = Income, the Columns F,G = Median. About the Columns C,D I didn’t understand how you computed them, because you made different computations in each cell. I have found how to construct a frequency table and how to choose the intervals (equal intervals) and the number of classes that I want.

Concerning column C: I simply generated arbitrary frequencies by ad-hoc formulae. Then I missed to replac the formulae by the results. This was misleading, of course. Sorry!
Column D simply accumualtes the distribution.
Since I don’t know a standard function calculating a median from the distribution, I had to find the critical classes next to the 50%-level using MATCH with the type parameter set to 1: “ascending order asserted”.
The critical classes are emphasised with the help of CF.
I now will attach a rectified example to my answer.

Because of your help I have managed to solve my problem. I just needed to compute the cumulative relative frequency of my data. Thanks again!